What Is a Virtual Private Cloud (VPC)? Explained Simply
What is a virtual private cloud VPC explained simply? A VPC is your own private, isolated network inside the cloud, a building you control, where you decide every room, every door, and who is allowed through each one. When you create a cloud account, nothing you launch floats loose on the public internet.
It lives inside a VPC, and the VPC is the outer boundary.
Here is the short answer. A VPC is a logically isolated virtual network within a cloud provider’s infrastructure, your own data centre built in software. You control the IP address range, the subnets, the route tables and the network gateways.
Amazon Web Services calls them VPCs, Google Cloud calls them VPC networks, and Microsoft Azure calls them VNets. The concepts are the same, and the names are the only real difference.
This explainer builds the whole model from zero, with a building analogy that makes each piece click, a plain comparison of AWS, Azure and Google Cloud, and the security group versus network ACL distinction that almost no guide untangles. By the end, you will be able to draw a VPC from memory.
Key Takeaways
A VPC is a logically isolated virtual network in a cloud region, spanning availability zones, that you own and control.
A VPC address range is written in CIDR notation, for example 10.0.0.0/16, which holds about 65,536 addresses.
Subnets divide the VPC into slices, each in one availability zone on AWS, with public subnets facing the internet and private subnets hidden from it.
Security groups are stateful firewalls at the resource level that only allow traffic, while network ACLs are stateless firewalls at the subnet level that allow and deny.
AWS calls its service a VPC, Google Cloud calls it a VPC network, and Azure calls it a VNet, but the concepts are the same.
The Building Analogy: Boundary, Rooms, Signs, Doors, Guards
The analogy is a building. The VPC is the building itself, the outer boundary that separates your network from everyone else’s. Subnets are the rooms inside it.
Route tables are the hallway signs that tell traffic where to go. Gateways are the doors to the outside. Security groups are the door guards.
App servers reach out for updates and APIs through the NAT gateway, but nothing reaches in.
Your Address Range: CIDR, in Plain Terms
When you create a VPC, you assign it a CIDR block, an IP address range. On AWS the allowed size is between /16, which holds 65,536 addresses, and /28, which holds 16 addresses, and AWS recommends a block from RFC 1918 private space, such as 10.0.0.0/16.
Do not let CIDR intimidate you: the only number that matters is the one after the slash, which tells you how many addresses you have, and a /16 is the common choice for a VPC that will grow.
Choose a range that is large enough for growth and different from every network you will ever connect to.
Subnets: Carving the VPC into Rooms
Subnets divide your VPC’s IP range into smaller segments, each tied to a specific availability zone. You will typically create two types. Public subnets have a route to an internet gateway, so resources here can get public IP addresses and be reached from the internet.
Private subnets have no direct route to the internet, so resources here can only be reached from within the VPC or through a NAT gateway.
A subnet is a segment of a VPC’s IP address range, and subnets are used to separate resources and traffic within the VPC.
A typical design has a public subnet for the load balancer, a private subnet for the app servers, and a private subnet for the database, each repeated across two or three availability zones so that the failure of one zone does not take down the application.
On Azure, a subnet is regional and spans all zones, so you choose the zone on the resource, not on the subnet, and Azure designs usually have fewer, larger subnets. On Google Cloud, a subnet is per region, which is similar to Azure.
Route Tables and Gateways: Signs and Doors
Each subnet is associated with a route table that determines where traffic goes. A route table is a set of rules, and each rule says: traffic for this destination goes through this gateway. The public subnet’s route table has a route to the internet gateway, which is what makes it public.
The private subnet’s route table has no route to the internet gateway, which is what makes it private, and it may have a route to the NAT gateway instead.
The internet gateway is the door that lets traffic in and out. It sits at the edge of the VPC, and it is what makes a public subnet public. The NAT gateway sits in a public subnet, and it lets private resources reach out for updates and APIs without letting anything reach in.
The app servers reach out through the NAT gateway, which is shown as a dashed line in most diagrams, because the traffic flows one way.
VPC peering connects two VPCs to each other, so they can talk as if they were one network, and a transit gateway connects many VPCs through a central hub. For most beginners, the internet gateway and the NAT gateway are the only doors that matter.
Concept
AWS
Google Cloud
Azure
Virtual network
VPC
VPC Network
VNet
Network scope
Regional
Global
Regional
Subnet scope
One availability zone
Per region
Spans all zones in region
Internet gateway
IGW (explicit)
Implicit, via routes
Implicit
NAT
NAT Gateway
Cloud NAT
NAT Gateway
Firewall
Security Groups + NACLs
Firewall Rules
NSGs + ASGs
Reserved IPs per subnet
5
4
5
Security Groups vs Network ACLs: The Guards, Untangled
Security group versus network ACL confusion is almost never untangled in VPC guides, so here it is plainly. A security group is a stateful virtual firewall at the resource level, and it only allows traffic. It has no deny rules, and it defaults to denying inbound traffic and allowing outbound traffic.
When you attach a security group to a server, you are telling the guard at that server’s door which visitors to let in.
A network ACL is a stateless firewall at the subnet level, and it both allows and denies traffic. It has numbered rules that are evaluated in order, and it applies to every resource in the subnet.
When you attach a network ACL to a subnet, you are telling the guard at the room’s door which visitors to let in and which to turn away, and the rules are checked in numerical order until one matches.
The difference that matters is state. A security group is stateful, which means it remembers the traffic it allowed out and lets the reply back in automatically. A network ACL is stateless, which means it does not remember, and you must explicitly allow the return traffic.
In practice, most people use security groups for their day-to-day rules and network ACLs as a second layer of defence, or not at all. If you remember only one thing, it is this: security groups guard the resource, network ACLs guard the subnet, and security groups are the ones you will use most.
AWS VPC vs Azure VNet vs Google VPC
AWS simply refers to its VPC service as Amazon VPC, and it provides the same basic functionality described in this article, allowing customers to create isolated networks within the AWS cloud.
The main difference is scope: a Google Cloud VPC is global, which means a single VPC can span regions, while an AWS VPC is regional and cannot stretch across regions.
The main difference is that a VNet’s subnets are regional and span all availability zones, while an AWS VPC’s subnets live in exactly one zone.
Building Your First VPC: A Practical Framework
Use this framework to build your first VPC. It is the same structure a cloud engineer would use, scaled down for a first project, and it follows the building analogy from the start of this article.
Choose a CIDR block, such as 10.0.0.0/16, from private address space, and make sure it does not overlap with your office network.
Create two public subnets in two availability zones, for the load balancer, and two private subnets for the app servers.
Create a private subnet for the database, in a different availability zone from the app servers.
Attach an internet gateway to the VPC, and add a route to it in the public subnets’ route table.
Add a NAT gateway in a public subnet, and add a route to it in the private subnets’ route table.
Attach security groups that allow only the traffic each tier needs, and default everything else to private.
Frequently Asked Questions
What is a VPC in simple terms?
A VPC is your own private, isolated network inside the cloud, a building you control, where you decide every room, every door, and who is allowed through each one.
It is a logically isolated virtual network within a cloud provider’s infrastructure, and you control the IP address range, the subnets, the route tables and the network gateways.
What is the difference between a VPC and a VPN?
A VPC is a private network inside the cloud, while a VPN is an encrypted tunnel that connects two networks. A VPN can connect your office to your VPC, through a virtual private gateway, but the VPC itself is the network, and the VPN is one way to reach it.
They solve different problems, and they are often used together.
What is a subnet in a VPC?
A subnet is a segment of a VPC’s IP address range, used to separate resources and traffic within the VPC. Subnets can be public, with a route to an internet gateway, or private, with no direct route to the internet.
On AWS, each subnet lives in exactly one availability zone, while on Azure a subnet spans all zones in the region.
What is the difference between a security group and a NACL?
A security group is a stateful firewall at the resource level that only allows traffic, and it defaults to denying inbound and allowing outbound. A network ACL is a stateless firewall at the subnet level that both allows and denies traffic, with numbered rules evaluated in order.
Security groups guard the resource, network ACLs guard the subnet, and security groups are the ones you will use most.
Is AWS VPC the same as Azure VNet?
Yes, in concept. Both are a private, isolated network that you own inside the cloud provider’s data centres. The main differences are scope and subnets: an AWS VPC is regional with subnets in one availability zone each, while an Azure VNet is regional with subnets that span all zones.
Google Cloud’s VPC is global, spanning regions.
The default VPC is a starting point, but for anything beyond a single server, you should create your own VPC with public and private subnets, so that your database is never reachable from the internet.
How much does a VPC cost?
A VPC by itself is free on AWS and Azure, and so are subnets and route tables. You pay for the resources inside it, such as virtual machines and databases, and for the NAT gateway, which is charged by the hour and by the data it processes.
The NAT gateway is the only VPC component with a meaningful cost, and it is worth it for the security it provides.
Conclusion
What is a virtual private cloud (VPC) explained simply comes down to the building: a boundary, rooms, signs, doors and guards. The VPC is the boundary, subnets are the rooms, route tables are the signs, gateways are the doors, and security groups are the guards.
Learn those six concepts, and every cloud provider looks the same with different names, because the model is the same underneath. Default everything to private, and open only what needs to be open.
Ayesha is the co-founder of occcy and the editor behind its entertainment and lifestyle coverage. She believes good writing should feel like a conversation with a smart friend, clear, warm, and genuinely helpful.