Ping times out on brand new EC2 instance

0

I just launched a simple EC2 instance (AMI, Linux/UNIX, x86_64, m4.large), using the default Security Group.

At the AWS console, system status checks are all green, and the instance is running.

SSH from my home times out, and pings all time out -- even after stopping and restarting the instance. My home connectivity is fine: pings to www.amazon.com return packets.

Ideas?

asked a year ago745 views
1 Answer
1
Accepted Answer

Have you checked the inbound rules? Default security group rules normally allow inbound SSH / HTTP / HTTPS. If you want to enable ping you need to add a corresponding rule.

For SSH reconfirm if the inbound IP allows traffic from anywhere or if it's restricted to specific IP's your ISP's IP should be one of those.

--Syd

profile picture
Syd
answered a year ago
  • Thank you, Syd. The additional rule for ICMP traffic fixed the ping issue. But SSH still times out.

    Timeout doesn't seem like a problem with the key pair; I'm doing ssh -i [path_to_pem_file] ip_address, using the pem file path and IP for my instance. So why else might it time out?

  • What is the inbound rule for SSH. 0.0.0.0/0 or some specific IP? If specific IP does it match to your ISP IP? Can you set up a allow "all Traffic" rule as inbound rule and check SSH? Your correct that key pair wont cause a timeout.

  • Yeah, it's been just the default security group this whole time, open to all traffic, all ports. No specific IP or masking. The instance is running. SSH just times out with that command above (using the actual file path and IP, of course). Ping still returns packets in a timely fashion.

    The "Network in (bytes)" monitor shows 1.2k bytes coming in on the last attempt.

  • Just wanted to make a point that the default security group allows all traffic on all ports BUT the source is often the security group id itself. In which case traffic from outside is not allowed. It's something often overlooked. If as you say SG has been open to all traffic and all ports all this time, you would not need to have added a rule to allow ping also. Security rule is the most likely rule for timeout and SSH service not running is the other reason but highly unlikely. You can try to launch an identical instance with same SG and see if you yet get timeout. If so I'd rule out SSH service issue. Not much I can think of apart from this these two reasons.

  • Thanks, Syd. You were correct: the source was the group ID itself; I didn't know what this meant. So I added another rule to the group, specifically allowing SSH using TCP on port 22 from my home IP. I can now successfully SSH into the machine. Much appreciated!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions