0

I have an EC2 server set up inside a VPC on Amazon. The server is reachable from the outside via its elastic ip address; however, when I attempt to ping that ip from inside the remote desktop session, the server cannot reach itself. Is there a way to make this happen?

2 Answers 2

3

It should work.

As much I understand, you haven't allowed the ping requests to be responded by the Machine in your Firewall rules. So, you shouldn't be able to ping the IP from outside too.

To do the same, Create a rule in your Security group by following steps.

  1. Create a Custom ICMP rule
  2. Type should be Echo Request
  3. Source should be everything (default)
  4. Add and Apply.

After this, you should be able to ping the Elastic IP from anywhere.

2
  • I'm able to ping it from outside, but not inside. I added a firewall rule that allows inbound from the elastic IP, and it works. Sort of counter-intuitive, considering that the traffic is also oubound (which is allowed), but oh well...
    – theMayer
    Mar 17, 2013 at 3:17
  • It is definitely a bit counter-intuitive, but your solution is correct. I am not powerful enough to downgrade public score from GeekRide but his answer is dead wrong, naive and dangerous. If you cannot access a resource the fix is not to open it up to the world at large. Nov 19, 2019 at 0:02
1

Looks like theMayer solved it: the security group needs to allow traffic from the EIP itself as the source in order to ping from servers located inside the VPC (or default VPC in this case). It's definitely a bit counter-intuitive at first glance.

Opening ICMP traffic to anybody on Earth (or beyond) is not a solution per se.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .