For system, network and cloud administrators
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