Security Group and ACL Troubleshooting
You'll learn: How to diagnose and resolve connectivity problems caused by misconfigured security groups and network access control lists (ACLs).
The Core Problem
When a connection fails in the cloud, the culprit is often a misconfigured security group or network ACL. Think of security groups as stateful bouncers at the door of each resource—they remember who was invited in and automatically let them out. Network ACLs are stateless checkpoint guards at the subnet boundary—they check every single packet in both directions independently, with no memory of previous traffic.
Common Troubleshooting Patterns
Stateful vs. Stateless Confusion
Security groups only need an inbound rule to allow traffic in; the response automatically flows back. Network ACLs require both inbound and outbound rules plus ephemeral port ranges (typically 1024-65535) for return traffic. Missing either direction blocks the connection entirely.
Rule Order Matters (ACLs)
ACLs evaluate rules by number, lowest first. A DENY rule at position 100 will block traffic even if an ALLOW exists at 200. Security groups implicitly deny everything not explicitly allowed, with no rule ordering—all allows apply.
Diagnostic Approach
- Check VPC Flow Logs for REJECT entries identifying which security control blocked traffic
- Verify both directions: if SSH fails, check source→destination:22 AND destination→source:ephemeral
- Review rule specificity: overly broad CIDRs or missing protocol specifications cause unexpected blocks
- Use network path analysis tools to visualize the traffic flow and identify where packets drop
Key Takeaway: Security group and ACL problems stem from misunderstanding stateful vs. stateless behavior—always verify both directions of traffic flow and use Flow Logs to pinpoint exactly where packets are being rejected.