Azure Private DNS Zone unable to resolve hostname created in a different Vnet

Apurva Pathak 570 Reputation points
2024-09-22T15:24:56.8766667+00:00

Hi all,

I am doing some PoC around Azure private DNS zones and it's auto-registration features. I created two vnets a central private DNS zone and linked both of the Vnets to the Zone with auto-registration enabled (in both of the vnet links).

However, I noticed that hosts deployed in Vnet1 can resolve hosts which are deployed in the Vnet1, but cannot for those which are created in Vnet2. It seems very weird to me because both of the Vnets are linked to the same DNS Zone and a resolution should be given.

Any help on understanding this better would be greatly appreciated.

PFB some snips for reference.

Note: Both Vnet are peered to each other.

PS: I tried disabling auto-registration on one of the links and tried creating manual records but no luck.

DNS Zone Private Link:

{E6A200A7-477D-4BA3-AC45-25B6EC7CE6BA}

Intra Vnet resolution:

User's image

Inter Vnet resolution{B1EFA7A6-1CA3-4F67-B344-9909522B6736}

however, ping to IP of the host works:

{F87BECC5-8148-46FA-89F9-B63F182B528B}

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
677 questions
{count} votes

Accepted answer
  1. TP 95,556 Reputation points
    2024-09-22T16:15:11.6166667+00:00

    Hi Apurva,

    You need to use the FQDN instead (so it knows suffix to use), similar to below:

    ping azulvnet002.yourdomain.com
    

    If you want you could add your domain name to the search directive in the VM's /etc/resolv.conf file. For example, something similar to below:

    search vt20vdk0ae4udlttckjrbsgtjb.zx.internal.cloudapp.net yourdomain.com
    

    With the name added on to the end of the search directive you could then enter ping azulvnet02 if you wanted and it would work since it would know to try to resolve using azulvnet02.yourdomain.com.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    1 person found this answer helpful.

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.