Forum Discussion

MohamedT_Trabelsi's avatar
MohamedT_Trabelsi
Copper Contributor
Jun 07, 2022

Azure Private DNS Zone : Create Resource Records and verify DNS resolution using VMs

Link: https://docs.microsoft.com/en-us/azure/dns/

 

Benefits of having Private DNS in Azure  : Gives you secure and reliable name resolution

 

You can use Private DNS : Same VNET / Across VNET / Across resgions and subscriptions

Also, you need to specify allowed vnets. 

 

Resolution Virtual Network : Specify list of Vnets

Registration Virtual Network : add or delete VMs (automatically add DNS records)

 

How to use it ? 

 

1-Create a Private DNS Zone 

 

2-Create a VNET/Subnet 

 

 

3-Link VNET to the private DNS 

 

 

 

Enable auto registration :  enables automatic creation of DNS records in this Private DNS zone, for the virtual machines connected to the virtual network.

 

 

4-Create the first  Virtual Machine  

 

 

Than Create the second VM. 

 

If you go the private DNS zone, you found the record fo the two VMs (because the auto registration was enabled)

 

Connect to the two VMs and enable the 'ICMPv4' protocole with this command : 

 

New-NetFirewallRule –DisplayName "Allow ICMPv4-In" –Protocol ICMPv4

 

Ping the VMs by name 

From VM 1 to VM2 :

 

From VM2 to VM1 : 

 

Go and try it 🙂 

No RepliesBe the first to reply

Resources