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 DNS Server IP Address
  • How To setup dns Server In Azure
  • Azure VM DNS Not Resolving
  • What Is Azure Public IP DNS Name
  • Azure VM Hostname

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.

Azure VM FQDN

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

Azure DNS Server IP Address

Azure DNS Server IP Address is a static IP address that will not change. The Azure DNS Server IP Address is 168.63.129.16.

How To setup dns Server In Azure

Below are the steps that needs to be followed to setup dns server in Azure.

  1. The first step is, make sure you will have to add a DNS to your Virtual Network.
  2. In the Azure Portal, navigate to Networks –> {Network Name} > Configure > DNS servers, here you need to add the IP and name to it.
  3. As a next step, deploy the virtual machine inside the virtual network, then you need to configure it’s IP to exactly the same IP that you have defined in the Azure Portal.
  4. Now, you need to configure the DNS server with the VM details. Don’t forget to set the forwarders that will actually help you to resolve the names from outside the virtual network.
  5. Finally, you need to reboot your VM to apply the updated configuration.

This is How To setup dns Server In Azure.

Azure VM DNS Not Resolving

If you are facing the error Azure VM DNS Not Resolving, then make sure to configure the below settings.

  1. You must create the conditional forwarders that will actually help you to accomplish the name resolution for the additional namespace.
  2. You need to install the DNS server tools in your management VM and administer DNS in the DNS management console.

Check out the steps to create the conditional forwarders and the steps to install the DNS server tools in your management VM now.

What Is Azure Public IP DNS Name

To help you to connect to a resource with the help of the name, Azure registers the name as well as the IP address in its DNS. Now whatever name you provide, Azure appends a subnet like yourlocation.cloudapp.azure.com to the name, and then it becomes the fully qualified DNS name.

Azure VM Hostname

Both the names i.e VM name and the hostname are the same by default when you create a new VM. To access a virtual machine from a different machine available on the same network, you can use the primary IP address and the hostname.

Note that, A virtual machine can have up to 10 hostnames and primary IP addresses.

You can view the Azure VM Hostname using the below methods

  • Using Azure Service Management REST API
  • By using Remote Desktop (command prompt or SSH terminal)
  • Using the Service configuration file

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
  • Azure DNS Server IP Address
  • How To setup dns Server In Azure
  • Azure VM DNS Not Resolving
  • What Is Azure Public IP DNS Name
  • Azure VM Hostname