Create a VM with a static public IP address using the Azure portal

You can create virtual machines (VMs) in Azure and expose them to the public Internet by using a public IP address. By default, Public IPs are dynamic and the address associated to them may change when the VM is deleted. To guarantee that the VM always uses the same public IP address, you need to create a static Public IP.

Before you can implement static Public IPs in VMs, it is necessary to understand when you can use static Public IPs, and how they are used. Read the IP addressing overview to learn more about IP addressing in Azure.

Note

Azure has two different deployment models for creating and working with resources: Resource Manager and classic. This article covers using the Resource Manager deployment model, which Microsoft recommends for most new deployments instead of the classic deployment model.

Scenario

This document will walk through a deployment that uses a static public IP address allocated to a virtual machine (VM). In this scenario, you have a single VM with its own static public IP address. The VM is part of a subnet named FrontEnd and also has a static private IP address (192.168.1.101) in that subnet.

You may need a static IP address for web servers that require SSL connections in which the SSL certificate is linked to an IP address.

IMAGE DESCRIPTION

You can follow the steps below to deploy the environment shown in the figure above.

Create a VM with a static public IP

To create a VM with a static public IP address in the Azure portal, complete the following steps:

  1. From a browser, navigate to the Azure portal and, if necessary, sign in with your Azure account.
  2. On the top left hand corner of the portal, click New>>Compute>Windows Server 2012 R2 Datacenter.
  3. In the Select a deployment model list, select Resource Manager and click Create.
  4. In the Basics blade, enter the VM information as shown below, and then click OK.

    Azure portal - Basics

  5. In the Choose a size blade, click A1 Standard as shown below, and then click Select.

    Azure portal - Choose a size

  6. In the Settings blade, click Public IP address, then in the Create public IP address blade, under Assignment, click Static as shown below. And then click OK.

    Azure portal - Create public IP address

  7. In the Settings blade, click OK.
  8. Review the Summary blade, as shown below, and then click OK.

    Azure portal - Create public IP address

  9. Notice the new tile in your dashboard.

    Azure portal - Create public IP address

  10. Once the VM is created, the Settings blade will be displayed as shown below

    Azure portal - Create public IP address