Cloud Security Groups vs Network ACLs
Compare stateful cloud security groups with stateless network ACLs, subnet filtering, and defense-in-depth network architecture.
2-Layer Cloud Perimeter Defense
In cloud architectures (e.g. AWS VPC), traffic passes through two distinct firewall defense tiers:
Incoming Internet Packet
│
▼
[ 1. Network ACL (NACL) ] ──(Subnet Level / Stateless)
│
▼
[ 2. Security Group (SG) ] ──(Instance / ENI Level / Stateful)
│
▼
EC2 Instance / Container PodDirect Comparison
| Feature | Security Group (SG) | Network ACL (NACL) |
|---|---|---|
| Operates At | Instance / Network Interface (ENI) Level | Subnet Boundary Level |
| Statefulness | Stateful (Return traffic is automatically permitted) | Stateless (Must explicitly permit both inbound and outbound rules) |
| Rule Types | ALLOW rules only (Deny is implicit default) | ALLOW and DENY rules |
| Rule Evaluation | All rules are evaluated together | Evaluated in strict numerical order (Rule 100, Rule 200, *) |
Security Group Chaining Architecture
Rather than hardcoding IP addresses into firewall rules, reference other Security Group IDs:
- Load Balancer Security Group (
sg-alb):- Ingress: Allow Port
80&443from0.0.0.0/0(Everyone).
- Ingress: Allow Port
- Application Server Security Group (
sg-app):- Ingress: Allow Port
3000ONLY fromsg-alb.
- Ingress: Allow Port
- Database Security Group (
sg-db):- Ingress: Allow Port
5432ONLY fromsg-app.
- Ingress: Allow Port
Direct internet connections to the database on port 5432 are impossible because no public inbound rule exists.
DevOps DNS Architecture & Service Discovery
Architect split-horizon DNS, private hosted zones in Cloud VPCs, and Kubernetes CoreDNS internal service discovery.
Production Reverse Proxies: NGINX, Envoy & Traefik
Compare modern production reverse proxies (NGINX, Envoy, Traefik, Caddy), edge rate limiting, and buffer tuning for high traffic.