This template shows how to create a DNS server that forwards queries to Azure's internal DNS servers so that hostnames for VMs in the virtual network can be resolved from outside the network. As illustrated below, this is useful for doing hostname resolution between virtual networks or from on-premise machines to Azure. See Name resolution using your own DNS server for more details of how DNS resolution work in Azure.