The Ping functionality on Windows Azure VM is blocked by default for security reasons, to be to enable them you can do that from the Windows firewall advanced features on each VM or you can login on the virtual machine and open the command prompt as an administrator and execute this command.


netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" dir=in action=allow enable=yes protocol=icmpv4:8,any
Comments (10)

  1. Roy says:

    This command adds a rule to the Windows OS firewall running on the guest. It doesn’t allow incoming ICMP to the VM through the Azure “firewall” (aka Network Security Group). Additionally, Microsoft limiting ping “for security reasons” is really pretty silly. I have a Linux VM up in Azure and I’d like to allow ICMP through to satisfy my monitoring software, but their portal doesn’t even give me the option for ICMP rules. Lame.

    1. Hi Roy,

      Yes, this only allows the ICMP on the windows OS firewall to allow you to ping machines over the internal network – Microsoft doesn’t allow the ICMP as you mentioned for security reasons but this feature is currently under review, would love that you vote for it as well to push it faster into the development queue.



  2. Jeremy says:

    Works great! Can now ping using PsPing utility version 2.01 (TCP) by specifying a public port. A regular ping still does not work.

    1. Hi Jeremy, Thanks – yes you can use PsPing to ping azure machines from public internet if you open the public port that you are pinging in the NSG.

  3. Marcelo Santos says:

    Doesn't Work. This firewall rule could be work if the machine is not inside the Azure infrastructure. There is some sort of block or another firewall layer that is blocking the outside pings.

    1. Hi Marcelo, yes it only works from inside the local network whether this is on Azure Vnet or through VPN site to site – if you want to ping Azure VMs from the internet , use PSping and open the port that you want to ping in the NSG.

  4. joem says:

    Unfortunately … I had nope it would but it didn't work

  5. Thanks David , I adjusted it as per your comment 🙂

  6. David Burela says:

    FYI, you have smart quotes in the snippet.

    Doing a copy/paste directly into a command prompt causes it to fail due to invalid input

Skip to main content