How to add public IP to Azure VM

This article will discuss multiple ways to associate a Static Public IP address with your Azure Virtual Machine. To connect to the VM from the Internet, you need an Azure VM public IP. There are two types: dynamic and static. If you want to avoid this type of scenario and don’t want to use the Public IP address, you can use Azure VM FQDN as a better solution.

How to add public IP to Azure VM

Let us discuss all the approaches individually.

Approach-1 Adding public IP to Azure VM during the creation time

You can associate or assign a static Public IP while creating a new Virtual Machine and an existing Azure Virtual Machine.

To add public IP to Azure VM, follow the below steps.

  1. Log in to the Azure Portal.
  2. Search for “Virtual Machines” and click on the search result “Virtual Machines”.
  3. Click on the + Create option –> Azure Virtual Machine.
add public ip to azure vm

4. On the Create a Virtual Machine window, fill in all the essential information on the Basics tab.

5. Now, click on the Networking Tab. For the Public IP option, click on the Create new link to create a new Public IP.

how to add public ip address to azure vm

6. On the Create public IP address window, provide a name for the public IP and select the Static option, which is essential —> Click on the OK button.

how to add public ip in azure vm

Approach-2 Assign public IP to Azure VM using PowerShell

Check out how to assign a static Public IP to a Virtual Machine during creation time using PowerShell for a step-by-step tutorial.

Approach-3: Adding public IP address to Azure VM for an existing Virtual Machine

When you already have a Virtual Machine, you can assign a static Public IP address using the instructions below.

  1. Log in to the Azure Portal.
  2. Search for “Virtual Machines” and click on the search result “Virtual Machines”.
  3. You will now see the list of Virtual Machines you created. Click on the one where you want to change the Public IP address to Static.
  4. Click on the Networking option from the left navigation.
how to associate public ip to azure vm

5. Now, click on the Network Interface option.

how to add public ip to existing azure vm

6. Click on the IP configurations option from the left navigation on the Network Interface page.

how to add a public ip to azure vm

7. Click the IP configuration (ipconfig 1).

azure vm public ip

8. Click the Create new link for the Public IP address option under the Public IP address settings.

how to add public ip in azure vm

9. Provide a name for the Public IP and select the assignment as Static. Then click on the OK button, and finally, click on the Save button to save the changes.

azure vm add public ip

You may also like following the articles below

Wrapping Up

In this article, we have discussed how to assign a static Public IP to the Azure Virtual to a new Virtual Machine and an existing Virtual machine.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

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