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 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 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?
  • 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