Private subnet
A private subnet is a subnet whose resources lack direct connectivity or reachability to the public internet.
Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu
A private subnet is a subnet whose resources are not directly reachable from the public internet.
- How it is used
- Places application services that should not be directly internet-accessible behind an internet-facing load balancer.
- How deep it goes
- Works through CIDR division, public-IP settings, NAT placement, and outbound routing in a Terraform subnet module.
- Examples
- Uses an API container, database, cache, and load balancer, alongside a Terraform public-and-private-subnet module.
- What you can do after
- Build it from scratch with Terraform: divide a supplied CIDR block and configure private-subnet outbound access through NAT.
Secure APIs
A private subnet is a cloud network subnet that lacks direct internet exposure and is intended for internally accessed resources.
- How it is used
- Uses network segmentation to keep internal API services away from direct internet exposure.
- How deep it goes
- Explains isolation, DMZ routing, and cross-segment bridges, but does not specify provider-specific subnet configuration steps.
- Examples
- Shows API gateways and bastion servers in a DMZ protecting private APIs, databases, and developing endpoints.
- What you can do after
- Evaluate network topology by checking internet exposure, DMZ routing, segment bridges, and restricted private access.
Also covered in
What to know first
- access control listAn access control list is a set of rules or permissions specifying which identities or network traffic may access a resource or perform particular operations.
Related concepts
- subnetkind of · A subnet is a logical subdivision of an IP network with its own address range, defined by a network prefix.
- NAT gatewayuses · A NAT gateway is a network component that enables private-network resources to initiate outbound connections through address translation without accepting unsolicited inbound connections.
- network address translationuses · Network address translation is a networking technique that rewrites IP addresses and often transport-layer ports as traffic crosses a gateway or network boundary.
- n-tier architectureused by · N-tier architecture organizes an application into distinct tiers with separate responsibilities and defined interactions, which may be logical divisions or separately deployed components.
- network segmentationconfigured by · Network segmentation is the division of a network into distinct physical or logical zones with controlled communication between them.
Questions about private subnet
What is private subnet?
A private subnet is a subnet whose resources lack direct connectivity or reachability to the public internet.
Which Manning books explain private subnet?
Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu and Secure APIs.
What should I know before learning private subnet?
Manning books that teach private subnet usually introduce access control list and AWS Internet Gateway first.
What is the difference between private subnet and AWS Internet Gateway?
A private subnet is a subnet whose resources lack direct connectivity or reachability to the public internet. An AWS Internet Gateway is a VPC component that provides a path between resources in a virtual network and the public internet.
What is private subnet a kind of?
Private subnet is a kind of subnet. A subnet is a logical subdivision of an IP network with its own address range, defined by a network prefix.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

