azurecommand-line-interfaceporticmp

az vm open-port icmp, is that possible?


Following up on Can't open Azure VM Port and https://learn.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal

Is it possible to open icmp port for ping using azure cli, like az vm open-port or something?


Solution

  • Is it possible to open icmp port for ping using azure cli, like az vm open-port?

    Azure NSG now supports ICMP protocol and allows ping to a VM as we can see in the below screenshot from the document here.

    enter image description here

    But az vm open-port command do not have a parameter to pass ICMP protocol, refer this.

    You could use az network nsg rule create command to allow ICMP on a VM as mentioned here.