Interview Prep/Networking/VPC & Cloud Network Design

You operate multiple AWS accounts and need to audit whether any security group is open to 0.0.0.0/0 on SSH. How do you do it at scale?

AdvancedScenarioVPC & Cloud Network Design
Answer

Situation read → You need continuous detection, not a one-off script.

What I'd do →

  1. Enable AWS Config rule restricted-ssh in all accounts via an aggregator
  2. Query with aws ec2 describe-security-groups --filters Name=ip-permission.from-port,Values=22 Name=ip-permission.cidr,Values=0.0.0.0/0
  3. Use Security Hub findings and EventBridge to auto-remediate or page
  4. Block creation with an SCP or Terraform policy check (OPA, Checkov)

Why → Detective control plus preventive control in CI closes the loop.

Interview tip → Say remediation by auto-revoking is only safe after teams were warned.

All Networking questions Roadmap: Networking for DevOps

More on VPC & Cloud Network Design