With what address should a server located on AWS be accessed?
I've created an AWS instance and installed a web server on it. However the server is not reachable via any of the:
- ec2-174-129-24-92.compute-1.amazonaws.com
- the IP address from instance's
ifconfig
- an elastic IP address I've created on the AWS dashboard and associated with the instance
Surprisingly, ssh with root@ec2-174-129-24-92.compute-1.amazonaws.com
works fine.
What might be the problem and how to bind an address to the instance?
Updated for 2014 - the current Amazon UI no longer uses numbers for ICMP types, so the existing answer doesn't work anymore.
In your security group:
and you'll be able to ping.
Give 2 rules in AWS security group (Inbound),
Ping doesn't work with EC2 because ping runs over the ICMP protocol which is blocked in a typical EC2 security group configuration.
Here's a very nifty way to work around this by using tcping (a ping alternative that works over a TCP port):
tcping ec2-174-129-24-92.compute-1.amazonaws.com
tcping ec2-174-129-24-92.compute-1.amazonaws.com 22
It runs on port 80 (the first example) but you can also specify a different port (the second example) to be used to test connectivity.
I found that if you install a VPN server on your AWS server, you can connect to the VPN and ping the private IP address in the virtual private network.