How To Open Ports On Azure VM

In this article, I will walk you through all the steps to open ports on Azure VM.

How To Open Ports On Azure VM

To open ports on Azure VM, follow the below steps.

1. Log in to Azure Portal.

2. Search for Virtual Machines and click on the search result in Virtual Machines under services, as shown in the screenshot below.

open ports azure vm

3. Click on the specific Virtual machine from the list below.

open ports on azure vm

4. Expand the Networking node, click on the Network settings link, and click on the Inbound port rule option from the Create port rule dropdown, as shown in the screenshot below.

How To Open Ports On Azure VM

5. On the Add inbound security rule window, enter the below details.

  • Source: Select the source as any.
  • Source port ranges: Specify * for this option.
  • Destination: Choose the destination as Any.
  • Service: Choose the service type, like RDP, SSH, etc, based on your requirements. You can choose the type as Custom also; if you choose the Custom option, the system will allow you to enter the Destination Port Ranges and protocol option manually based on your requirement; if you are selecting any other option, based on the selection the values for these two fields will auto-populated.
open ports in azure virtual machine
  • Destination Port Ranges: This option value will be auto-populated based on the service you selected. But as I mentioned above, if you choose the service as Custom, the system will allow you to enter the values for this field and the Protocol field manually.
  • Action: Ensure you select the Allow option.
  • Priority: Enter a number for the priority like 200, 300, etc.
  • Name: Enter a meaning full name, or you can keep the default option.

Finally, click the Add button, as shown in the screenshot below.

how to open ports in azure vm
open ports in azure vm

Now, see below the security rule created successfully.

how to open port 22 in azure vm

Now the open ports have been added successfully as shown in the screenshot shown below.

open port 22 in azure vm

Video Tutorial

You may also like the following articles.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!