Search code examples
azurednsazure-dns

Azure DNS Zone: What should I do so that my custom DNS will be used instead of the Azure DNS with IP address 168.63.129.16?


Currently, I am setting up a Hybrid Environment in Azure along with the existing Data Center.

I have configured the Site-to-Site connection between Azure HUB-VNET & On-Prem using Virtual Gateway. Communication between Azure HUB-VNET & On-Prem is working.

I have the following Hub-Spoke model

enter image description here

vnet-hub-poc-hubspoke is the Hub VNET with an Azure Firewall

enter image description here

Hub VNET is peered with Prod VNET

enter image description here

Prod VNET is configured as shown below

enter image description here

also peered with HUB VNET

I have following VMs created in the Prod VNET

enter image description here

with Routing Table configured

enter image description here

I have create a DNS Zone in Azure

# Create DNS Zone
domainName="northeasttechnie.xyz"
az network dns zone create -g $rgName -n $domainName
az network dns record-set a add-record -g $rgName -z $domainName -n www -a $vmIP

Questions:

  • What should I do so that my custom DNS will be used instead of the Azure DNS with IP address 168.63.129.16? should I update the DNS Server configuraiton at the VNET Level like mentioned below

enter image description here

  • What should I do so that my Custom DNS will forward the queries to on On-Prem DNS?
  • What should I do so that my On-Prem DNS will forward the queries to Azure DNS or DNS Server for further resolution?

Solution

  • I tried to add my custom server instead of the Azure DNS with IP address 168.63.129.16 as below.

    enter image description here

    To add your custom DNS, Make sure you need to set up VPN before using the custom dns otherwise machine deployed in vnet to network from being unable to connect on-premises domain controllers.

    To configure an azure vpn, In your virtual machine gateway -> point to site configuration -> authentication as active directory as below.

    enter image description here

    • For tenant Sign in with your azure ad global admin portal use the tenant id as https://login.microsoftonline.com/<tenantID>/
    • In azure portal -> enterprise application -> add new application -> create your own application -> azurevpn singin with azurevpn enter image description here

    enter image description here

    once your vpn is created in enterprise application, your azure vpn application id as Audience

    enter image description here

    • Issuers as https://sts.windows.net/<tenantID>/ and save

    Then, refresh and download the vpn client in desktop and install the azurevpnclient import your downloaded file and automatically displayed the details as below.

    enter image description here

    when I tried and add my custom server it added successfully and vpn also connected like below.

    enter image description here

    Also, please check this document: Ref1, Ref2 & Q&A which gives some points