Soru

Zorluk: OrtaVPC Connectivity and Routing Troubleshooting

A SysOps Administrator launches an Amazon EC2 instance in a newly created subnet within a VPC. The instance is assigned a public IPv4 address, and the associated security group is configured to allow inbound SSH traffic on port 22 from the administrator's public IP address. The default network ACL (NACL) is associated with the subnet. However, the administrator is unable to establish an SSH connection to the instance, resulting in a connection timeout. Which of the following is the most likely cause of this routing and connectivity issue?

  1. The route table associated with the subnet does not contain a route pointing to the Internet Gateway.Cevap
  2. B
    The outbound rules of the associated network ACL do not allow traffic to ephemeral ports 1024-65535.
  3. C
    The subnet's route table has not been associated with the S3 gateway endpoint.
  4. D
    The instance is encrypted with a custom AWS KMS key, and the KMS key policy does not allow the instance's IAM role to decrypt the volume.

Cevap

The route table associated with the subnet does not contain a route pointing to the Internet Gateway.
For an EC2 instance to receive traffic from the internet, it must be in a public subnet. A public subnet is defined by having a route table containing a default route pointing to an Internet Gateway. In this scenario, although the instance has a public IP address and the security group allows inbound SSH traffic, the lack of a route targeting the Internet Gateway prevents internet-bound traffic from being routed correctly, resulting in a connection timeout.

Adım Adım Çözüm

1
Check the status of the EC2 instance to ensure it is running and has passed its status checks.
The instance is running and has a public IPv4 address assigned.
Before troubleshooting routing, confirm that the instance is operational.
2
Verify the route table associated with the instance's subnet.
The route table contains only a local route for the VPC CIDR block.
Without a route directing external traffic (0.0.0.0/0) to an Internet Gateway, the subnet is private and cannot communicate with the internet, leading to connection timeouts.
3
Update the route table to add a route for 0.0.0.0/0 targeting the Internet Gateway attached to the VPC.
SSH connection succeeds.
This establishes internet routing for the public subnet, allowing the workstation to connect to the instance.

Anahtar Kavram

Subnets require a route targeting an Internet Gateway in their associated route tables to allow internet communication.
Bu soruyu puanla