Interview Prep/Networking/VPC & Network Architecture

How do NACLs fit in when you already have security groups?

IntermediateProductionVPC & Network Architecture
Answer

Treat NACLs as a coarse, stateless backstop at the subnet boundary: deny known bad CIDRs, block ports that should never be used, isolate the data subnets from the internet. Do not duplicate fine-grained allow lists there.

Because they are stateless you must allow ephemeral ports 1024–65535 for responses, and rules are evaluated by number, lowest first; a deny placed after a broad allow never fires.

All Networking questions Roadmap: Networking for DevOps

More on VPC & Network Architecture