For system, network and cloud administrators

How to open a port on an Azure virtual machine using Azure CLI

If you need to open a port on your Azure virtual machine (in this case, port 80), you can use:

az vm open-port --port 80 --resource-group YourResourceGroup --name YourVMName

If you need to open all ports, for example, you can use asterisk instead of the port number like this:

az vm open-port --port "*" --resource-group YourResourceGroup --name YourVMName

Leave a Reply

Your email address will not be published. Required fields are marked *