Question

Difficulty: MediumVPC Connectivity and Routing Troubleshooting

An operations team has deployed an application server on an Amazon EC2 instance in a newly configured subnet within a VPC. The instance is assigned a public IP address, and its security group is configured to allow all outbound traffic. However, the server cannot connect to any external internet resources.

Which two troubleshooting steps should a SysOps Administrator perform to identify the root cause of this connectivity issue? (Select TWO.)

  1. Verify that the subnet's route table contains a route for 0.0.0.0/00.0.0.0/0 targeting the VPC's Internet Gateway (IGW).Answer
  2. Confirm that the subnet's network ACL inbound rules allow response traffic from the internet on ephemeral ports (10241024-6553565535).Answer
  3. C
    Verify that the instance's security group has an inbound rule allowing return traffic on ephemeral ports (10241024-6553565535).
  4. D
    Verify that the subnet's route table contains a route for 0.0.0.0/00.0.0.0/0 targeting a Virtual Private Gateway (VGW) attached to the VPC.
  5. E
    Configure a Gateway VPC endpoint for internet-bound traffic and verify that it is associated with the subnet's route table.

Answer

The correct troubleshooting steps are to verify that the subnet's route table contains a route for 0.0.0.0/00.0.0.0/0 targeting the VPC's Internet Gateway (IGW), and to confirm that the subnet's network ACL inbound rules allow response traffic from the internet on ephemeral ports (10241024-6553565535).
For an EC2 instance to connect to the internet directly, it must reside in a public subnet. A subnet is public if its route table has a route for 0.0.0.0/00.0.0.0/0 pointing to an Internet Gateway (IGW). Additionally, because network ACLs are stateless, they evaluate inbound and outbound traffic independently. When an instance initiates an outbound connection (e.g., HTTP/HTTPS), the response from the server returns on a random ephemeral port (10241024-6553565535). Thus, the inbound network ACL rules must allow traffic on these ephemeral ports for the connection to succeed.

Step-by-Step Solution

1
Check the routing configuration of the subnet.
Ensure there is a route for 0.0.0.0/00.0.0.0/0 pointing to the Internet Gateway (IGW).
An EC2 instance in a public subnet needs a route in its associated route table pointing to the IGW to route outbound internet traffic.
2
Check the network ACL configuration of the subnet.
Ensure the inbound rules allow traffic on ephemeral ports (10241024-6553565535) from source 0.0.0.0/00.0.0.0/0.
Since Network ACLs are stateless, return traffic from the internet (which uses ephemeral ports) must be explicitly allowed inbound.

Key Concept

Troubleshooting internet connectivity for EC2 instances in a public subnet by validating route tables and stateless Network ACL rules.
Rate this question