15. VPC Concepts, Checked Against What's Actually Running
Why this became a translation exercise
Section titled “Why this became a translation exercise”The course teaches this lesson entirely in AWS terms — VPCs, security groups, NAT gateways — inspecting an EC2 instance that, in this project’s actual path, doesn’t exist. Everything real runs on Oracle Cloud Infrastructure instead (Lessons 12-13). Rather than treat the lesson as pure theory disconnected from anything actually built, the networking concepts translate cleanly enough to apply directly to the real deployment: a VPC is a VCN, a Security Group is a Network Security Group, an Internet Gateway is, unsurprisingly, an Internet Gateway. The mechanics are the same regardless of which vendor’s console they’re clicked through.
What actually exists today
Section titled “What actually exists today”pretzel-vcn (10.0.0.0/16) has exactly one subnet — pretzel-public-subnet (10.0.0.0/24) — with a route table sending 0.0.0.0/0 to an Internet Gateway. That’s the entire network topology. Every container on pretzel-vm-micro, including Postgres and Redis, sits in that same public-routed subnet, distinguished from the open internet only by security list rules and the fact that their ports aren’t published outside the Docker network.
That’s worth saying plainly rather than glossing over: this is a flat, single-tier network, not the multi-AZ public/private split the lesson actually wants inspected. There’s no private subnet to test reachability into, no NAT gateway to trace a blocked packet through, no separation between “things the internet can reach” and “things that only talk to each other.” The lesson’s exercises — testing public-to-private reachability, tracing a rejected flow log line, confirming a private subnet’s route table — don’t have a private half to run against yet on this deployment.
The translation, for when it matters
Section titled “The translation, for when it matters”| AWS term | OCI equivalent |
|---|---|
| VPC | VCN |
| Subnet (public/private) | Subnet — same concept |
| Internet Gateway | Internet Gateway |
| NAT Gateway | NAT Gateway |
| Security Group (stateful) | Network Security Group |
| Network ACL (stateless) | Security List |
| Elastic IP | Reserved Public IP |
| VPC Endpoint | Service Gateway / Private Endpoint |
| Availability Zone | Availability Domain / Fault Domain |
| VPC Flow Logs | VCN Flow Logs |
None of this is exotic — every cloud vendor is solving the identical problem (which packets get in, which get out, which never leave the private network) with different marketing names on the same handful of primitives.
The target architecture, sketched but not built
Section titled “The target architecture, sketched but not built”A proper version of this — matching what the lesson actually wants demonstrated — separates the current public subnet from a new private one: postgres and redis move into a private subnet with no route to an Internet Gateway at all, reachable only from the app tier’s security group, egressing outbound (for OS patches, not customer traffic) through a NAT or service gateway instead of a public IP. backend and frontend stay in the public subnet, since they’re the pieces actually meant to be reached from outside.
That’s a real, useful next step — genuinely tightens the current setup, where the database technically shares a routable-to-the-internet subnet with everything else, protected only by security list rules rather than by the network topology itself. It hasn’t been built yet. Saying so directly matters more than a diagram implying otherwise would.
How this looks in production
Section titled “How this looks in production”Teams that skip the public/private split entirely usually get away with it right up until a security list rule gets misconfigured or copy-pasted from a tutorial with 0.0.0.0/0 still in it — at which point “the database was never reachable from the internet, the security list just happened to be tight enough” turns out to have been the actual safety net the whole time, not defense in depth. A private subnet with no route to an Internet Gateway is defense in depth; a public subnet with careful security list rules is one misconfiguration away from an incident. The gap between those two is exactly what this lesson is pointing at.
Next: Lesson 16, Cloud Architecture.