A company has deployed a fleet of backend processing instances in a private subnet () that must query an external license validation API at over HTTPS. The outbound traffic is routed through a NAT Gateway in the public subnet (). The Network Access Control List (NACL) associated with the private subnet currently has default deny rules for custom traffic. Which two changes are required in the private subnet's NACL to enable successful end-to-end communication with the license validation server?
- An outbound rule to allow TCP port traffic destined for the external validation server IP address.Answer
- An inbound rule to allow TCP traffic from the external validation server IP address on ephemeral ports to .Answer
- CAn inbound rule to allow TCP port traffic originating from the external validation server IP address.
- DAn outbound rule to allow TCP traffic on ephemeral ports to destined for the external validation server IP address.
- EAn inbound rule to allow TCP port traffic originating from the NAT Gateway IP address.
Answer
The changes required are: adding an outbound rule to allow TCP port 443 traffic to the external validation server, and adding an inbound rule to allow TCP traffic from the external validation server on ephemeral ports.
Because Network Access Control Lists (NACLs) are stateless, both the request (outbound TCP port 443) and response (inbound TCP ephemeral ports 1024-65535) must be explicitly allowed. Since the backend instances initiate the HTTPS connection to the external validation server, the outbound path requires a rule allowing TCP port 443 traffic to the destination. For the return traffic, the external server will respond from its port 443 to the ephemeral ports allocated by the client instances in the private subnet. Therefore, the inbound path requires a rule allowing TCP traffic from the validation server's IP address to the ephemeral port range (1024 to 65535) of the private subnet.
Step-by-Step Solution
Key Concept
The stateless nature of Network Access Control Lists (NACLs) requires rules for both request and response paths, including allowing inbound traffic on ephemeral ports for outbound connections.