In this article, I will walk you through all the steps to open ports on Azure VM.
Table of Contents
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.

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

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.

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.

- 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.


Now, see below the security rule created successfully.

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

Video Tutorial
You may also like the following articles.
- How to check availability zone of Azure VM
- How To Increase Ram Size In Azure VM
- How to add public IP to Azure VM
- How To Attach Network Interface To Azure VM
- How To Swap OS Disk In Azure VM
- Azure VM backup step by step

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
