How to enable Ping (ICMP echo) on an Azure VM

Microsoft

This is just a very quick blog post because I got the question from a couple of people. In this blog post want to show you how you can enable ping (ICMP) on a public IP address of an Azure virtual machine (VM). First, just let me say that assigning a public IP address to a virtual machine can be a security risk. So if you do that, make sure you know what you are doing. If you need admin access to virtual machines only for a specific time, there are services like Azure Just-in-Time VM Access (JIT) and Azure Bastion you should have a look at. Now back to the topic, Azure by default denies and blocks all public inbound traffic to an Azure virtual machine, and also includes ICMP traffic. This is a good thing since it improves security by reducing the attack surface.

 

Read more here: https://www.thomasmaurer.ch/2019/09/how-to-enable-ping-icmp-echo-on-an-azure-vm/

4 Replies

@thomasmaurer 

yes it's correct. also in windows vm you have to allow inbound firewall ICMP port or disable firewall.

I am just wondering is it possible to ping Azure Virtual Network Gateway Public IP from my internal Azure VM? I already have a site-to-site connection between GCP and Azure. I can ping the internal IPs of the VMs (Azure) but not my Virtual Network Gateway from my Azure VM (Internal) or VM with external IP. Thanks
Is it possible to do a similar thing on a Playfab Virtual Machine?

@Kytan0115 

 

In your playfab VM, go to the networking section, and then add the inbound as well as outbound rules as follows-

techmeav_0-1688011141643.png

techmeav_1-1688011173870.png

 

Then Voila!! Just ping your VM and it will reply!!!