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
As nowthatsamatt said, you want to allow ICMP from all addreses.
To do this on the command line you can run:
ec2-authorize <group> -P icmp -t -1:-1 -s 0.0.0.0/0
Or if you prefer the AWS Console, this is what it would look like (current as of 2012-09-19):
AWS Console Image
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.
If your instance uses a Windows AMI you need to make sure that both the security group on the AWS console AND the Windows Firewall are set up to accept connections on the port(s) you require.
I had the same issue enabling http access until I configured the Windows firewall to allow connections on the ports I wanted. This is easily done in Windows by accessing Control Panel>System and Security>Windows Firewall>Advanced Settings. Then configure a new port rule to allow incoming TCP traffic to the port or port range you require.
Give 2 rules in AWS security group (Inbound),
Custom ICMP Rule Echo Request N/A 0.0.0.0/0
Custom ICMP Rule Echo Reply N/A 0.0.0.0/0
UPDATE for September 2014: After a while of not being able to apt-get without freezing, I tried to ping www.google.com. To my surprise I couldn't ping either. I followed the suggestion above by creating a new ICMP rule with an Echo Request for Inbound. This didn't work for me either. After much trying I created a new rule for Outbound with Echo Request. Now it works. Maybe AWS added this recently? Anyway, hope this helps somebody out there. Not being able to do something as simple as pinging could drive a person nuts.
edit: now my apt-get works too!
Eight years late but hopefully this will help someone else...
The below shows how to enable the ports needed for pings.
1) First make sure the EC2 instance has a public IP. It has a Public DNS or Public IP address then you should be good. This should also be the address you ping.
2) Go to the Security Group that EC2 is using.
3) Create a windows firewall exception.