Introduction
Reliable name resolution is a critical part of modern cloud infrastructure, especially in secure, private network environments. In this hands-on guide, we’ll configure Azure Private DNS to enable seamless internal communication using custom domain names instead of IP addresses. The exercise covers creating a private DNS zone, linking it to a virtual network, and configuring DNS records for backend resources: demonstrating practical Azure networking and cloud administration skills used in real-world enterprise environments.
Scenario
Your organization requires workloads to use domain names instead of IP addresses for internal communications. The organization doesn’t want to add a custom DNS solution. You identify these requirements.
- A private DNS zone is required for contoso.com.
- The DNS will use a virtual network link to app-vnet.
- A new DNS record is required for the backend subnet.
Skilling tasks
- Create and configure a private DNS zone.
- Create and configure DNS records.
- Configure DNS settings on a virtual network.
Exercise instructions
Note: This exercise requires the Lab 01 virtual networks and subnets to be installed. A template is provided if you need to deploy those resources.
Create a private DNS zone
Azure Private DNS provides a reliable, secure DNS service to manage and resolve domain names in a virtual network without the need to add a custom DNS solution. By using private DNS zones, you can use your own custom domain names rather than the Azure-provided names.
1.On the Azure portal, search for and select Private dns zones.
2.Select + Create and configure the DNS zone.
| Property | Value |
|---|---|
| Subscription | Select your subscription |
| Resource group | RG1 |
| Name | private.contoso.com |
| Region | East US |
3.Select Review + create and then select Create.
4.Wait for the DNS zone to deploy, and then select Go to resource.
Create a virtual network link to your private DNS zone
To resolve DNS records in a private DNS zone, resources must be linked to the private zone. A virtual network link associates the virtual network to the private zone.
1.In the portal, continue working on the private.contoso.com DNS zone.
2.In the DNS Management blade, select + Virtual network links.
3.Select + Add and configure the virtual network link.
| Property | Value |
|---|---|
| Link name | app-vnet-link |
| Virtual network | app-vnet |
| Enable auto registration | Enabled |
4.Select Create and wait for the deployment to finish. If necessary, Refresh the page.
Create a DNS record set
DNS records provide information about the DNS zone.
1.In the portal, continue working on the private.contoso.com DNS zone.
2.In the DNS Management blade, select + Recordsets.
3.Notice that two A records have automatically been created for each of the virtual machines.
4.Select + Add and configure a record set. When finished select Add.
| Property | Value |
|---|---|
| Name | backend |
| Type | A |
| TTL | 1 |
| IP address | 10.1.1.5 |
Note: This record set implies there is a virtual machine in app-vnet with a private IP address of 10.1.1.5.
Key takeaways
Here are the main takeaways:
- Azure DNS is a cloud service that allows you to host and manage domain name system (DNS) domains, also known as DNS zones.
- Azure DNS public zones host domain name zone data for records that you intend to be resolved by any host on the internet.
- Azure Private DNS zones allow you to configure a private DNS zone namespace for private Azure resources.
- A DNS zone is a collection of DNS records. DNS records provide information about the domain.
Summary
In this exercise, we configured Azure Private DNS to enable secure and reliable internal name resolution within a virtual network. We created a private DNS zone for private.contoso.com, linked it to the app-vnet virtual network, and configured DNS record sets for backend resources. This setup demonstrates how Azure Private DNS simplifies internal communication by allowing workloads to use custom domain names instead of IP addresses, while maintaining centralized and secure DNS management in Azure.
Top comments (0)