How to Resolve hostname between Azure vm to On-premises vm vice versa?

kedar giri 81 Reputation points
2023-11-29T08:47:16.61+00:00

There is 2 server one azure vm and another on-premises vm. i have created site to site vpn and it is working fine..i am able to rdp to azure vm via private ip, but i am not able to resolve hostname vice versa. i have added hostname of both the server to etc/hosts on both servers similarly i have even open port 53 but unable to resolve hostname....is there is any solution to the problem ??

Note: there is no dns server.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,167 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,468 questions
Windows Server Clustering
Windows Server Clustering
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Clustering: The grouping of multiple servers in a way that allows them to appear to be a single unit to client computers on a network. Clustering is a means of increasing network capacity, providing live backup in case one of the servers fails, and improving data security.
1,017 questions
{count} votes

Accepted answer
  1. Prrudram-MSFT 27,171 Reputation points
    2023-12-01T11:16:12.51+00:00

    Hi @kedar giri

    Thank you for reaching out to the Microsoft Q&A platform.

    If there is no DNS server available, the solution is adding the IP address and hostname of each server to the hosts file on both servers.

    On the Azure VM, you need edit the hosts file located at C:\Windows\System32\drivers\etc\hosts. Add the IP address and hostname of the on-premises VM to the file, using the following format:

    Did you add it in the below format? If possible share a screenshot of hosts file masking IP addresses.

    For example:
    192.168.1.2 onpremisesvm

    Let me know if you want to discuss further, I will be more than happy to help

    Please click "Accept as answer" if this helps.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.