How would you secure a VPC against data exfiltration to the internet?
IntermediateScenarioVPC and Networking
Answer
Situation read → Default-deny egress with allow-listed destinations and visibility.
What I'd do →
- Remove public IPs, route egress through NAT and AWS Network Firewall using domain-list rules
- Tighten SG egress rules
- Use Route 53 Resolver DNS Firewall to block unknown domains
- Add endpoint policies for S3 to restrict to your buckets
- Alert on GuardDuty exfiltration findings
Why → DNS and S3 are the typical exfiltration paths, so control both.
Interview tip → SG default egress allows all; mention that you tighten it.
More on VPC and Networking
What is a VPC and what are the CIDR constraints?BeginnerWhat makes a subnet public or private?BeginnerHow do route tables work, including the local route and longest-prefix match?IntermediateInternet Gateway vs NAT Gateway: what does each do?BeginnerNAT Gateway vs NAT instance?IntermediateSecurity group vs network ACL: compare them.Beginner