- Newest
- Most votes
- Most comments
Hello.
The EC2 public IP address is NATed and provided by AWS, so it cannot be confirmed by running the "netstat -rn" command from the OS.
Use metadata to check from EC2.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#working-with-ip-addresses
View the IPv4 addresses
You can use the Amazon EC2 console to view the public and private IPv4 addresses of your instances. You can also determine the public IPv4 and private IPv4 addresses of your instance from within your instance by using instance metadata. For more information, see Instance metadata and user data.The public IPv4 address is displayed as a property of the network interface in the console, but it's mapped to the primary private IPv4 address through NAT. Therefore, if you inspect the properties of your network interface on your instance, for example, through ifconfig (Linux) or ipconfig (Windows), the public IPv4 address is not displayed. To determine your instance's public IPv4 address from an instance, use instance metadata.
General troubleshooting procedures for when you cannot access the Internet from EC2 are described in the following documents.
https://repost.aws/knowledge-center/ec2-connect-internet-gateway
A common case is that the subnet on which the EC2 is running does not have a route to the Internet Gateway, or the network ACL or security group does not allow the necessary communication.
Hi,
Because you provided public IP address and FQDN of your EC2 instance I can guess that you might not configured Security Group attached to the instance properly. Make sure it has appropriate rules for ingress.
Relevant content
- asked 3 months ago
- asked a month ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago