views:

672

answers:

4

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:

  1. ec2-174-129-24-92.compute-1.amazonaws.com
  2. the IP address from instance's ifconfig
  3. an elastic IP address I've created on the AWS dashboard and associated with the instance

Surprisingly, ssh with [email protected] works fine.

What might be the problem and how to bind an address to the instance?

+2  A: 

I don't think you can ping Amazon servers. Have look at the this thread: http://developer.amazonwebservices.com/connect/message.jspa?messageID=105686

My guess is that they're trying to prevent nasty types from 'discovering' hosts by trying to ping random numbers on amazon AWS.

leonm
A: 

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.

Jivko Petiov
A: 

I've noticed today that when I ping my AWS instance, the first ping responds and then the rest fail.. So maybe Amazon has updated their stuff so that you can see the server (to test connectivity) but then denies subsequent ICMP's to prevent DDOS ping floods? I wonder if others are seeing this too these days?

+3  A: 

in your security group open -1 to -1 on icmp for range 0.0.0.0/0 and you'll be able to ping.

see my screenshot for a better view:

http://imgur.com/uIeoM.png

nowthatsamatt