How it works · 10 of 38 Core
What is a VPC (private cloud network) and how do cloud firewalls work?
Walls inside the cloud
Private networks (VPC) & firewalls: A VPC is your own private network inside a cloud provider: subnets decide which of your servers have any road to the internet at all, and each server's firewall (a security group) decides who may connect to which of its ports.
Loading the animation…
Say it like this A VPC is your own walled network in the cloud: subnets decide which servers have any road to the internet, and each server's security group decides who may knock on which door, so keep databases where there is no road in.
Under the hood — for builders
- Two locks
- Who can reach the database, for each mix of where it sits (subnet) and what its guest list says (security group). Only one corner is open to the whole internet; it takes two mistakes to get there.
- How big a VPC is
- You pick the size when you create it, as a block of addresses written like 10.0.0.0/16: the smaller the number after the slash, the more addresses.
- The source's own warning
- AWS VPC docs: when you open ports 22 (SSH) or 3389 (RDP), "authorize only specific IP address ranges. If you specify 0.0.0.0/0 … this enables anyone to access your instances from any IP address." 0.0.0.0/0 means every address there is.
- Terms
- VPC: your private network in one region. Subnet: a slice of its addresses in one zone. Route table: where traffic from a subnet may go. Internet gateway: the gate. NAT gateway: lets private servers call out without letting anyone call in. Security group: a server's guest list, allow rules only; replies to allowed traffic pass automatically. Network ACL: an optional subnet-level list that can also deny.
- Watch out
- Database or SSH ports open to 0.0.0.0/0. A subnet that hands every new server a public address. The default network ACL allows all traffic, so it is not a second lock until you change it.
- Measure it
- Count rules open to 0.0.0.0/0 on anything but 80 and 443; read VPC flow logs for rejected connections to see who is knocking.
- Sources
- AWS Amazon VPC User Guide: "Subnets for your VPC", "Control traffic … using security groups", "VPC CIDR blocks" (read November 2026). Durumeric, Wustrow & Halderman, "ZMap: Fast Internet-wide Scanning and Its Security Applications", USENIX Security 2013 (every IPv4 address in under 45 minutes from one machine).
What happens in the private networks (VPC) & firewalls animation, step by step?
- Your cloud account gets its own private network, a VPC: a walled plot of addresses, here 65,536 of them, that no one else's servers share.
- An inner wall splits it into subnets. Only the front yard has a gate to the internet: a public subnet. The back yard has no road in: a private subnet.
- Each server also has a guest list, a security group: which doors are open, and to whom. Customers reach the web server; only the web server may knock on the database.
- Your turn: someone moves the database to the front yard and opens door 5432 to anyone. No one has been told its address. How soon do strangers knock?
- Put it back: no road in, and a guest list that names one caller. Two locks, so one slip does not open the database to the world.
- The database is safe behind two walls. But how is the data inside it laid out: rows in tables, or documents in folders? Next: SQL vs NoSQL.
What everyday example explains private networks (VPC) & firewalls?
A walled plot with a front yard and a back yard. Only the front yard has a gate to the street; the back yard has no road in. Each building also keeps a guest list at its door: the shop takes any customer, the vault admits only the shop's own staff. A thief needs both a road and a name on the list.
Why should a team care about private networks (VPC) & firewalls?
You will decide where each server sits and which ports it opens; put databases and internal services in private subnets, let each security group name its callers instead of "anyone", and check for 0.0.0.0/0 on every change, because a single open rule can be found within the hour.