ping not working for ubuntu virtual machines on azure ping not working for ubuntu virtual machines on azure hadoop hadoop

ping not working for ubuntu virtual machines on azure


ICMP (Ping) is blocked in Azure so by design this will fail. You can get this to work depending on how you are setting up your network and what you are trying to ping. See https://social.msdn.microsoft.com/Forums/en-US/0669112c-a6dd-4290-bcde-9ce7b9d60d80/how-do-i-enable-pinging-a-vm for more details:

•Ping external address from Azure VM - does not work as Azure does not permit outbound ICMP

•Ping Azure VM from external address - does not work as Azure does not permit inbound ICMP

•Ping between Azure VMs using internal IP (DIP) - works, but guest OS firewall must be configured to allow it as by default ICMP is blocked by the guest.

•Ping between Azure VM and on-premise through Azure Connect (point-to-point IPSec VPN tunnel) or Virtual Network Gateway (site-to-site IPSec VPN tunnel) - works, but guest OS firewall must be configured to allow it as by default ICMP is blocked by the guest.

To allow ICMP on a Windows VM, from an elevated command prompt, run:

netsh advfirewall firewall add rule name="ICMPv6" dir=in action=allow enable=yes protocol=icmpv6 netsh advfirewall firewall add rule name="ICMPV4" dir=in action=allow enable=yes protocol=icmpv4


You can try hping3 ping host on port number,

sudo apt-get install hping3root@compare:~# sudo hping3 -S -p 80 google.comHPING google.com (eth0 216.58.196.174): S set, 40 headers + 0 data byteslen=44 ip=216.58.196.174 ttl=53 id=20026 sport=80 flags=SA seq=0 win=42900 rtt=32.8 mslen=44 ip=216.58.196.174 ttl=53 id=34969 sport=80 flags=SA seq=1 win=42900 rtt=36.6 mslen=44 ip=216.58.196.174 ttl=53 id=14912 sport=80 flags=SA seq=2 win=42900 rtt=32.6 mslen=44 ip=216.58.196.174 ttl=53 id=60826 sport=80 flags=SA seq=3 win=42900 rtt=32.5 mslen=44 ip=216.58.196.174 ttl=53 id=5138 sport=80 flags=SA seq=4 win=42900 rtt=32.3 ms^C--- google.com hping statistic ---5 packets transmitted, 5 packets received, 0% packet lossround-trip min/avg/max = 32.3/33.4/36.6 msroot@compare:~#