Ping problem is solved in EC2 instance.
When we ping a host from our own server, we must have ICMP enabled.
The Internet Control Message Protocol (ICMP) is a supporting protocol in the Internet protocol suite. It is used by network devices, including routers, to send error messages and operational information indicating, for example, that a requested service is not available or that a host or router could not be reached
So when ping operation is done it uses ICMP protocol to communicate to the other server which does not have any specific port to operate…
So when a new ec2 instance is created, while defining the security group one must add http (80), https (443) and ssh (22) rules to be able to access the instance via http/https/ssh and ICMP for pinging… Select all in the right drop down menu.
Lighsail does not allow outbound connections and it only allows only a selected list of servers to be able to perform outbound requests (did not test to determine the servers though) and it doesn’t support ICMP as well so its not possible to change the settings to perform ping operation…
Robert Lancer Steven Reubenstone Areous Ahmadtj Harsha Alva
This is the conclusion I was able to draw by performing some experiments on ec2 and lightsail…