An Amazon EC2 instance with the private IP address is launched in a private subnet of a VPC. The instance is configured to download software updates from a public repository at via HTTPS. The security group associated with the EC2 instance allows all outbound traffic and has no inbound rules. The instance is unable to complete the download. A SysOps Administrator enables VPC Flow Logs for the subnet and observes the following log entries:
| version | srcaddr | dstaddr | srcport | dstport | protocol | packets | bytes | start | end | action | log-status |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 10.0.1.15 | 198.51.100.50 | 49152 | 443 | 6 | 5 | 400 | 1718840000 | 1718840060 | ACCEPT | OK |
| 2 | 198.51.100.50 | 10.0.1.15 | 443 | 49152 | 6 | 5 | 400 | 1718840000 | 1718840060 | REJECT | OK |
Which of the following is the most likely root cause of this connection failure?
- The Network Access Control List (NACL) associated with the subnet lacks an inbound rule to allow traffic from the repository to the ephemeral ports (-) of the EC2 instance.Cevap
- BThe security group associated with the EC2 instance does not allow inbound traffic on TCP port 443, which is required to establish the SSL/TLS handshake for the HTTPS connection.
- CThe route table associated with the private subnet is missing a route targeting the Internet Gateway, preventing the return packets from reaching the EC2 instance.
- DThe VPC Flow Logs role is missing the iam:PassRole permission, which prevents the security group from dynamically evaluating return traffic for active TCP sessions.
Cevap
The Network Access Control List (NACL) associated with the subnet lacks an inbound rule to allow traffic from the repository to the ephemeral ports (-) of the EC2 instance.
The correct answer is that the Network Access Control List (NACL) lacks an inbound rule to allow traffic to the ephemeral ports. Network ACLs are stateless, meaning return traffic must be explicitly allowed. In this scenario, the outbound request from port 49152 to port 443 is accepted, but the inbound response from port 443 to port 49152 is rejected. Opening the ephemeral port range (-) inbound on the NACL resolves this issue.
Adım Adım Çözüm
Anahtar Kavram
Statelessness of Network ACLs vs. Stateful Security Groups
Tahmini Süre:2m 0s