In the early days of public cloud, virtual machines were assigned public IP addresses and exposed directly to the internet. Today, enterprise cloud computing is built upon isolated Software-Defined Networks (SDNs) called Virtual Private Clouds (VPCs). A VPC acts as your private virtual data center inside the cloud provider's global network.
Figure 5: Enterprise VPC Architecture: CIDR block partitioning, Internet Gateway (IGW), Application Load Balancers, NAT Gateway, Private Subnets, and Isolated Database Subnets.
When creating a VPC, you assign it an IPv4 address range using Classless Inter-Domain Routing (CIDR) notation based on RFC 1918 private address ranges:
10.0.0.0/16: 16 network bits, 16 host bits → Provides 65,536 total IP addresses (from 10.0.0.0 to 10.0.255.255). This is the standard recommended size for enterprise VPCs.10.0.1.0/24: 24 network bits, 8 host bits → Provides 256 total IP addresses (251 usable in AWS, as AWS reserves 5 IPs per subnet for network, router, DNS, and future use).The fundamental security rule of cloud networking is: Never place database instances or private application microservices in a public subnet.
| Feature | Public Subnet | Private Subnet |
|---|---|---|
| Route Table Configuration | Has an explicit route to an Internet Gateway (IGW): 0.0.0.0/0 → igw-xxxx. |
Has NO route to an Internet Gateway. Outbound traffic routes via a NAT Gateway. |
| Public IP Addresses | Instances can be assigned public Elastic IPs. | Instances ONLY receive private IP addresses (e.g., 10.0.2.45). |
| Direct Internet Ingress | Allowed (subject to Security Group rules). | Physically impossible from outside the VPC. |
| Typical Workloads | Application Load Balancers (ALB), Bastion Hosts. | Backend EC2 instances, Kubernetes Pods, RDS Databases. |
Question: "What is the difference between a Security Group and a Network ACL (NACL) in cloud networking?"
Answer: Security Groups operate at the virtual network interface (instance) level and are stateful (if you send a request out, the response is automatically allowed back in regardless of inbound rules). Network ACLs (NACLs) operate at the subnet boundary, are stateless (inbound and outbound traffic must be explicitly permitted with rule numbers), and support explicit "DENY" rules.
Broaden your enterprise cloud architecture and DevOps expertise across our curriculum:
Distribute incoming web traffic across public and private subnets using multi-AZ application load balancers.
Configure Amazon Route 53 latency, weighted, and failover routing policies pointing to VPC endpoints.
Configure Security Groups and Network ACLs to enforce strict ingress and egress traffic boundaries.
Automate the provisioning of multi-AZ VPCs, subnets, NAT gateways, and routing tables with Terraform HCL.