How to enable ping in aws EC2 instance

You are currently viewing How to enable ping in aws EC2 instance
PING not working in Aws ec2

In this article, I will discuss how to enable ping in AWS EC2 instance. To find the root cause of this issue, you need to know what is PING command is.

What is PING

Ping is a computer network administration software utility used to test the reachability of a host on an Internet Protocol (IP) network. It is available for virtually all operating systems that have networking capability, including most embedded network administration software.

Ping measures the round-trip time for messages sent from the originating host to a destination computer that is echoed back to the source. The name comes from active sonar terminology that sends a pulse of sound and listens for the echo to detect objects underwater.

Ping operates by sending Internet Control Message Protocol (ICMP) echo request packets to the target host and waiting for an ICMP echo reply. The program reports errors, packet loss, and a statistical summary of the results, typically including the minimum, maximum, the mean round-trip times, and standard deviation of the mean.

What could be the problem in AWS EC2

So if you can ping an IP or hostname, that means you can actually reach that server or system. Ping requires the destination host to have the ICMP port open and whitelisted for that IP.

PING not working in Aws ec2
PING not working in Aws ec2

How to Solve the issue

To solve this, you need to login to your AWS and then go to ec2 section.

Next click on the instance to go to the details of that instance. Over there you will see a tab “Security”.

Click the tab “Security” and open the security group settings.

Next, click on the edit Inbound Rule Button to edit the inbound rules.

Add an inbound rule for ICMP

Now save and run the ping command from your terminal again.

This time you will be able to see response from server.

Atiqur Rahman

I am MD. Atiqur Rahman graduated from BUET and is an AWS-certified solutions architect. I have successfully achieved 6 certifications from AWS including Cloud Practitioner, Solutions Architect, SysOps Administrator, and Developer Associate. I have more than 8 years of working experience as a DevOps engineer designing complex SAAS applications.

Leave a Reply