Custom Private DNS Zone

Azure Public Test Date Azure Public Test Result

Azure US Gov Last Test Date Azure US Gov Last Test Result

Best Practice Check Cred Scan Check

This template demonstrates how to create a highly-available pair of DNS servers hosting a private DNS zone for your virtual network. It also shows how to configure both Windows and Linux client VMs to register their DNS records with the DNS server. Each client registers an A record for forward (host-to-ip) DNS and a PTR record for reverse (ip-to-host) DNS.

The template uses the following elements:

  • A pair of Active Directory domain controllers to act as HA DNS servers. Active Directory has been used as it automatically handles replication between the two DNS servers to give a highly available resolving plane. Note: This setup is deployed by including a pre-existing template from the Azure gallery.

  • A VM Extension (in nested/setupserver.json) to modify the DNS server's settings to allow dynamic DNS updates from the clients and to add the reverse DNS zone.

  • VM Extensions (in nested/linux-client/setuplinuxclient.json and nested/windows-client/setupwinclient.json) to configure the client VMs to a) register their DNS records (A and PTR) and to use the desired DNS suffix instead of the Azure-provided suffix. When adding more client VMs to the virtual network, you can include these VM estensios to enable the private DNS functionality on them.

Deploy To Azure Deploy To Azure US Gov Visualize

Tags: Microsoft.Resources/deployments, Microsoft.Compute/virtualMachines/extensions, CustomScript, CustomScriptExtension, Microsoft.Network/networkInterfaces, Microsoft.Compute/virtualMachines