0
  • I cannot ping the private IP either from the AWS CloudShell or another EC2 instance:
[cloudshell-user@ip-10-0-161-171 ~]$ ping 10.1.0.10
ping: socket: Operation not permitted
  • Ping is enabled on the instance:
cat /proc/sys/net/ipv4/icmp_echo_ignore_all
0
  • The Image is: amzn2-ami-kernel-5.10-hvm-2.0.20220606.1-x86_64-gp2
  • The ping arrives in that subnet (i can see that with tcpdump)
  • The SG Rule is as follows (I replaced personal data with "..."): ICMP Rule

1 Answer 1

2

This is unfortunately not allowed in CloudShell

Cause: The ping utility uses Internet Control Message Protocol (ICMP) to send echo requests packets to a target host. It then waits for an echo reply from the target. Because the ICMP protocol isn't enabled in AWS CloudShell, the ping utility doesn't operate in the shell's compute environment. `

Source: https://docs.aws.amazon.com/cloudshell/latest/userguide/troubleshooting.html

2
  • Ok thanks, but I thought this was only meant for external IP addresses. But I tried to ping an internal (private) IP address ...
    – CPI
    Jul 15, 2022 at 9:47
  • That link says "Because the ICMP protocol isn't enabled in AWS CloudShell" which means you can't ping at all. A workaround is to install Nginx or Apache and use curl, which isn't a great workaround really.
    – Tim
    Jul 15, 2022 at 9:50

You must log in to answer this question.

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