How do you restrict egress traffic from private workloads?
IntermediateProductionVPC & Network Architecture
Answer
Default routes through NAT allow everything. Tighten with: security group egress rules limited to known ports and prefix lists, AWS Network Firewall or a proxy with domain allow-lists (SNI filtering), VPC endpoints instead of internet paths, and DNS Firewall to block known bad domains.
Egress control matters most for data exfiltration and for reverse shells after a compromise, and it is usually what auditors ask about.
More on VPC & Network Architecture
How would you design a production VPC for a three-tier web application?IntermediateHow many AZs and subnets should a production VPC use, and why?BeginnerWhat makes a subnet public versus private?BeginnerHow do you avoid NAT gateway single points of failure and cross-AZ charges?IntermediateWhen should you use VPC endpoints?IntermediateHow do you design connectivity for 50+ VPCs across accounts and regions?Advanced