Azure virtual machine DNS (FQDN)

In this azure tutorial, we will discuss Azure virtual machine DNS or Azure virtual machine fully qualified name(FQDN). Apart from this, we will also discuss on the below topics:

  • How do I add a DNS to Azure VM?
  • Azure virtual machine public IP
  • How to assign a static public IP while creating an Azure VM?
  • How to assign a static public IP for an existing VM in Azure?
  • Azure virtual machine open port
  • Azure virtual machine Close port

Azure virtual machine DNS or Azure virtual machine fully qualified name(FQDN)

When we are creating a virtual machine in Azure, It provides us with a public IP address. That IP we can use to RDP that virtual machine.

The public IP can change multiple times so it will be a challenge to provide the use of the public IP to RDP a virtual machine.

Now to help with this scenario, Azure provides us the option to set the DNS name for the virtual machine.

Public IP can change frequently but the DNS name will not change so you can use the DNS name to RDP the virtual machine instead of the Public IP address.

How do I add a DNS to Azure VM?

Follow the below steps to add a DNS name to the Azure virtual machine(VM).

Step- 1: Login to https://portal.azure.com/

Step- 2: Search for Virtual machines there.

How do I add a DNS to Azure VM?

Step- 3:  You will see the list of VM created in your Azure subscription. It will show the VM name, Type, Status, ResourceGroup, Location, etc.

How do we add a DNS to Azure VM?

Step- 4: Now click on the VM name. “MyNewVM” in my case. You can able to see the details of your virtual machine like Public IP address, status, Computer name, Operating system, Size etc.

Add a DNS to Azure VM

Step- 5: You can also see the DNS name here. Click on the configure link.

How to configure the DNS name in Azure VM

Step- 6: Select the Assignment as Dynamic, Provide a name for the DNS in the DNS name label field. Then click on the Save button.

How to configure the DNS name in Azure

So now if you can see my DNS name is “mynewvm.westus.cloudapp.azure.com“. You can see it here on the Overview tab.

How do I add a DNS to Azure VM?

Azure virtual machine public IP

When you will create a new virtual machine, Azure provides a public IP address for the virtual machine(VM).

That is a dynamic IP and use to change on each restart of the virtual machine. So in this case it is a challenge to RDP the virtual machine with the Dynamic public IP because it is kept on changing.

To avoid this type of scenario, You need to create a Static public IP that will not change it will be one for that particular virtual machine.

Restarting the virtual machine will not affect the Static public IP.It will remain same after you restart.

How to assign a static public IP while creating an Azure VM?

Follow the below steps to assign a static public IP while creating an Azure VM.

Step-1: Login to https://portal.azure.com.

Step-2: Now click on “Virtual machines” option from the left side Menu and then click on “Create” link.

How to assign a static public IP while creating an Azure VM?

Step- 3: Fill the details required in the Basic tab.

  • Subscription: Choose your correct subscription.
  • Resource group: You can choose the existing resource group or you can create a new one by clicking the “Create New” option. It acts like a container that stores the resources related to an Azure solution.
  • Virtual machine name: Provide a name for your virtual machine.
  • Region: This the location where you are going to create all the resources related to the virtual machine.
  • Image: Choose the Windows Server 2019 Datacenter. You can change it based on your business need.
  • Size: The size you want to assign based on your requirement. I have chosen Standard D2s v3 as per my business requirement.

In the Administrator account section, Choose a Username, Password that you will use to login to the VM once created.

How to assign a static public IP while creating an Azure VM

Step- 4: Now go to the Networking tab, click on Create new link for the Public IP field.

How to assign a static public IP to an Azure VM

Step- 5: In the Create public IP address window, give a name, Choose the SKU as Basic and Assignment as Static. Then click on the OK button.

How to assign a static public IP while creating a VM inAzure

In this way, you can create a static Public IP address while creating a new virtual machine.

How to assign a static public IP for an existing VM in Azure?

Follow the below steps to assign a static public IP while creating an Azure VM.

Step-1: Login to https://portal.azure.com.

Step- 2: Search for Virtual machines there.

How to assign a static public IP for an existing VM in Azure?

Step- 3: You will see the list of VM created in your Azure subscription. It will show the VM name, Type, Status, ResourceGroup, Location, etc.

Assign a static public IP for an existing VM in Azure

Step- 4: Now click on the VM name. “MyNewVM” in my case. You can able to see the details of your virtual machine like Public IP address, status, Computer name, Operating system, Size, etc.

How to enable a static public IP for an existing VM in Azure?

Step- 5: Click on Networking under Settings from the left menu.

Assign a static public IP for an existing VM in Azure

Step- 6: Click on Network Interface.

How to add a static public IP for an existing VM in Azure

Step- 7: Now click on IP configurations and then click ipconfig1.

How to add a static public IP for an existing VM

Step- 8: Click on IP address option and then click on Create new button.

How to enable a static public IP for an existing VM in Azure

Step- 10: In the Create public IP address window, give a name, choose the SKU as Basic and Assignment as Static and then click on Ok button.

How to enable a static public IP for an existing VM in Azure 2020

In this way, you can create a static Public IP address for an existing virtual machine.

Azure virtual machine open port

Follow the below steps for the open port in Azure

Step- 1: Login to https://portal.azure.com/

Step- 2: Search for Virtual machines there.

How to assign a static public IP for an existing VM in Azure?

Step- 3: You will see the list of VM created in your Azure subscription. It will show the VM name, Type, Status, ResourceGroup, Location, etc.

How do we add a DNS to Azure VM?

Step- 4: Now click on the VM name. “MyNewVM” in my case. You can able to see the details of your virtual machine like Public IP address, status, Computer name, Operating system, Size etc.

How to enable a static public IP for an existing VM in Azure?

Step- 5: Click on the Networking link under Settings.

Azure virtual machine open port

Step- 6: Click on the Add inbound port rule button.

how to open Azure virtual machine port

Step- 7: In the Add inbound security rule window, Add the below details and then click on the Add button.

how to open Azure virtual machine port

Step- 8: Now you can see the rule got created.

how to open virtual machine port in Azure

Azure virtual machine Close port

There are two options to close the Azure virtual machine port.

Option-1:

Follow the below steps

Step- 1: Login to https://portal.azure.com/

Step- 2: Search for Virtual machines there.

How to assign a static public IP for an existing VM in Azure?

Step- 3: You will see the list of VM created in your Azure subscription. It will show the VM name, Type, Status, ResourceGroup, Location, etc.

How do we add a DNS to Azure VM?

Step- 4: Now click on the VM name. “MyNewVM” in my case. You can able to see the details of your virtual machine like Public IP address, status, Computer name, Operating system, Size etc.

How to enable a static public IP for an existing VM in Azure?

Step- 5: Click on the Networking link under Settings.

Azure virtual machine close port

Step- 6: Click on the Add inbound port rule button.

how to close Azure virtual machine port

Step- 7: In the Add inbound security rule window, Add the below details, Select Deny in Action option, and then click on the Add button.

Close Server Ports And Deny Remote Access

Step- 8: You can see the inbound port rule got created.

how to Close Server Ports And Deny Remote Access

Option-2:

You can delete an existing inbound rule to close the Azure virtual machine port.

This is one more option to close the Azure virtual machine port.

Close Server Ports And Deny Remote Access

You may like following Azure tutorials:

Conclusion

In this Azure tutorial, We discussed

  • Azure virtual machine DNS or Azure virtual machine fully qualified name(FQDN).
  • Azure virtual machine public IP
  • How do I add a DNS to Azure VM?
  • Assign a static public IP while creating an Azure VM?
  • How to assign a static public IP for an existing VM in Azure?
  • Azure virtual machine open port
  • Azure virtual machine Close port

Leave a Comment