Concept and mechanism
A network control’s effect depends on its scope. Security groups attached to the same interface aggregate Allow rules; a narrower group does not cancel an opening in another group. There is no rule selecting the most restrictive group.
Permission at this control also does not guarantee the whole path, which may depend on routes, NACLs, and application behavior. NACLs evaluate rules numerically and stop at the first match. A more specific network in a later rule does not win because of specificity, unlike prefix-routing intuition. Analyze inbound and outbound paths because a NACL is stateless.
Guided application
In HTTPS diagnosis, allowing inbound 443 does not guarantee return traffic to the client ephemeral port. Identify each direction and the blocking control before broadening rules. Exceptions also exist: a NACL does not block AmazonProvidedDNS queries; consider the appropriate DNS control, such as Route 53 Resolver DNS Firewall, for that objective.
For administration, Session Manager can reduce inbound-port exposure and centralize authorization. However, content recording is unavailable for SSH or port-forwarding sessions. CloudTrail can record API calls, which is not equivalent to commands inside the tunnel.
Choose an administrative path meeting the actual evidence requirement.
Workshop: trace both directions
Consider client 10.0.2.10:53124 contacting server 10.0.1.20:443 in another subnet. Routes and groups permit communication. At the server NACL, inbound rule 100 allows TCP destination 443 from 10.0.2.0/24, followed by rule 200 denying TCP destination 443 from 10.0.2.10/32; everything else is denied.
Outbound rule 100 allows only TCP destination 443 to 10.0.2.0/24; everything else is denied. Before reading the answer, write the inbound result and return tuple. Answer: inbound is allowed by rule 100; the more specific rule 200 is never reached.
The return has source 10.0.1.20:443 and destination 10.0.2.10:53124, so the outbound rule does not match. An applicable outbound permission for that destination and port, before the denial, addresses this packet. For other clients, identify the required ephemeral range and authorized scope; do not generalize one sampled port to every connection.
Network and administrative-evidence acceptance
Change one premise at a time. If the inbound deny becomes rule 50, this request is denied before the Allow. If a second security group permits a broader source, the narrow group does not remove that permission.
Neither calculation alone proves the complete path: collect outcomes at the relevant controls and service. For administration, state the authorized identity, destination and required evidence separately. A Session Manager start event can demonstrate session opening but not SSH command content inside the tunnel.
Rehearsing acceptance requires producing the requested evidence type. Summarize in a table: control, direction, decisive rule, expected result and conclusion limit. This model uses supplied rules and tuples; it created no AWS subnets or sessions.
Rule 100 allows a /16 and rule 200 denies a contained /24. A matching packet is allowed by the first rule.
Common pitfalls
Restrictive group as Deny; more specific prefix as NACL priority; API logging as recorded shell.
Related topics: WAF and GenAI application protection · Federation and delegation across entities
Check semantics, order, and scope of each control on the complete path.
References
- Network ACLs · AWS documentation consulted 2026-09-29
- EC2 security groups · AWS documentation consulted 2026-10-12
- Security group connection tracking · AWS documentation consulted 2026-10-12
- Session Manager · AWS documentation consulted 2026-10-12