Interview Prep/Networking/Security: Firewalls, SGs, NACLs & VPN

Why restrict outbound traffic in security groups as well as inbound?

BeginnerScenarioSecurity: Firewalls, SGs, NACLs & VPN
Answer

Situation read → Default SGs allow all outbound, which helps attackers after a compromise.

What I'd do →

  1. Remove the default allow-all egress rule on sensitive tiers
  2. Allow only the required destinations, for example 443 to the NAT, 5432 to the database SG
  3. Use VPC endpoints and prefix lists for AWS services
  4. Test that the app still works, and watch flow logs for REJECT lines that reveal missing rules

Why → Egress filtering stops data exfiltration and reverse shells after an app compromise.

Interview tip → Say it's high value but expensive in effort, so apply it first to data and PCI tiers.

All Networking questions Roadmap: Networking for DevOps

More on Security: Firewalls, SGs, NACLs & VPN