Refer to the exhibit. A user is attempting to connect to a web server from the IP address 203.0.113.5 on port 80. Based on the provided Network ACL and Security Group configurations, what will be the result of this connection attempt?
Exhibit
{
"NACL_Inbound": [
{"Rule": 100, "Protocol": "TCP", "Port": 80, "Source": "203.0.113.5/32", "Action": "DENY"},
{"Rule": 200, "Protocol": "TCP", "Port": 80, "Source": "0.0.0.0/0", "Action": "ALLOW"}
],
"SecurityGroup_Inbound": [
{"Protocol": "TCP", "Port": 80, "Source": "0.0.0.0/0", "Action": "ALLOW"}
]
}Trap 1: The connection will be allowed because the Security Group permits…
Security Groups are stateful and allow traffic if a matching rule exists, but they are only evaluated after the stateless Network ACL. Since the NACL has already denied the traffic at the subnet boundary, the Security Group rules are never reached, and the connection attempt is effectively blocked.
Trap 2: The connection will be allowed because NACL Rule 200 permits all…
While Rule 200 is an 'ALLOW' rule for all traffic, NACL rules are not cumulative; the first rule that matches the traffic criteria is applied. Since Rule 100 is a more specific match for the source IP and appears earlier in the sequence, Rule 200 is never applied to this specific connection.
Trap 3: The connection will be denied because Security Groups take…
This statement is technically incorrect regarding the flow of inbound traffic. In AWS networking, the Network ACL acts as a firewall for the entire subnet and is the first line of defense. Inbound traffic must pass the NACL evaluation before it can reach the Security Group protecting the individual instance.
- A
The connection will be allowed because the Security Group permits all traffic on port 80.
Why it fails: Security Groups are stateful and allow traffic if a matching rule exists, but they are only evaluated after the stateless Network ACL. Since the NACL has already denied the traffic at the subnet boundary, the Security Group rules are never reached, and the connection attempt is effectively blocked.
- B
The connection will be denied because the NACL Rule 100 is evaluated first.
NACLs process rules in order starting from the lowest number. Because Rule 100 matches the source IP and port with a 'DENY' action, the packet is immediately discarded. The higher-numbered 'ALLOW' rule and the permissive Security Group rules are ignored because the first matching NACL rule takes precedence.
- C
The connection will be allowed because NACL Rule 200 permits all traffic on port 80.
Why it fails: While Rule 200 is an 'ALLOW' rule for all traffic, NACL rules are not cumulative; the first rule that matches the traffic criteria is applied. Since Rule 100 is a more specific match for the source IP and appears earlier in the sequence, Rule 200 is never applied to this specific connection.
- D
The connection will be denied because Security Groups take precedence over NACLs.
Why it fails: This statement is technically incorrect regarding the flow of inbound traffic. In AWS networking, the Network ACL acts as a firewall for the entire subnet and is the first line of defense. Inbound traffic must pass the NACL evaluation before it can reach the Security Group protecting the individual instance.