A financial technology company runs a payment validation service on Amazon EC2 instances within a private subnet. The instances must make outbound HTTPS requests to an external credit bureau API on port to verify transaction details. The security group associated with the EC2 instances allows outbound traffic to on port and has no inbound rules. To comply with security audits, the solutions architect must configure the private subnet's Network Access Control List (Network ACL) with the most restrictive rules possible to support this traffic. Which Network ACL configuration should the solutions architect apply to the private subnet to allow the validation traffic to flow successfully?
- Outbound rule: Allow TCP port to . Inbound rule: Allow TCP ports from .Answer
- BOutbound rule: Allow TCP port to . Inbound rule: No inbound rules are required because the Network ACL automatically tracks return traffic.
- COutbound rule: Allow TCP port to . Inbound rule: Allow TCP port from .
- DOutbound rule: Allow TCP ports to . Inbound rule: Allow TCP port from .
Answer
Configure an outbound Network ACL rule allowing TCP port 443 to anywhere, and an inbound Network ACL rule allowing TCP ports 1024 to 65535 from anywhere.
The correct configuration requires allowing outbound traffic to port 443 because the EC2 instances are initiating HTTPS requests to the external API. Because Network ACLs are stateless, they do not track connection state; therefore, a separate inbound rule must be configured to allow the return traffic. The return traffic is sent from the external API back to the ephemeral ports (TCP 1024 - 65535) allocated by the EC2 client instances.
Step-by-Step Solution
Key Concept
Stateless Network ACLs require explicit inbound rules for response traffic on ephemeral ports.