az vm open-port
Opens a VM to inbound traffic on specified ports. Azure CLI reference
5 options Its page in the Azure CLI reference
Options
--apply-to-subnetAllow inbound traffic on the subnet instead of the NIC--name, -nThe name of the virtual machine to open inbound traffic on.--nsg-nameThe name of the network security group to create if one does not exist.--portThe port or port range (ex: 80-100) to open inbound traffic to.--priorityRule priority, between 100 (highest priority) and 4096 (lowest priority).