A company is deploying a secure containerized application on Amazon EC2 instances within a private subnet (Subnet A: ). The application must consume a third-party messaging service hosted in an on-premises data center via an established AWS Direct Connect connection. The on-premises messaging service endpoint is at and listens on TCP port . The security team has implemented a custom Network Access Control List (NACL) for Subnet A. The Security Group (SG) associated with the EC2 instances allows outbound TCP traffic on port to and has no inbound rules. Which configuration of NACL rules for Subnet A is required to establish successful outbound communication to the on-premises service while maintaining the principle of least privilege?
- AInbound: No inbound rules are required because the Security Group is stateful. Outbound: Allow TCP traffic on port to destination .
- Inbound: Allow TCP traffic on ports - from source . Outbound: Allow TCP traffic on port to destination .Answer
- CInbound: Allow TCP traffic on port from source . Outbound: Allow TCP traffic on port to destination .
- DInbound: Allow all traffic from source . Outbound: Allow all traffic to destination .
Answer
Inbound: Allow TCP traffic on ports - from source . Outbound: Allow TCP traffic on port to destination .
The correct option is the one that configures the outbound NACL rule to allow TCP port to the on-premises IP address, and configures the inbound NACL rule to allow the return traffic on the ephemeral port range (-) from the same IP address. Because Network ACLs are stateless, return traffic is not automatically permitted and must be explicitly allowed by matching the client's dynamic source ports.
Step-by-Step Solution
Key Concept
VPC Network ACLs are stateless and require explicit rules for both outbound request traffic and inbound ephemeral return traffic.
Estimated Time:2m 0s