Hello @rLodha ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
Unfortunately, configuring reverse DNS for a Public IP address resource is currently not supported in the Azure portal.
At present, you can use either Azure PowerShell, Azure classic CLI, or Azure CLI to accomplish this task and Azure currently supports reverse DNS only for Public IPv4 address resources.
Services in Azure use IP addresses assigned by Azure and owned by Microsoft. These reverse DNS records (PTR records) must be created in the corresponding Microsoft-owned reverse DNS lookup zones.
For more information on Reverse DNS in Azure, please refer : https://learn.microsoft.com/en-us/azure/dns/dns-reverse-dns-overview
As explained in this documentation, Azure only allows the creation of a reverse DNS record where domain name specified in the reverse DNS record is the same as, or resolves to, the DNS name or IP address of a PublicIpAddress or Cloud Service in the same Azure subscription.
For example: suppose the PublicIpAddress resource has the DNS name xyz.northus.cloudapp.azure.com and IP address 23.96.52.53. The ReverseFqdn for the PublicIpAddress can be specified as:
- The DNS name for the PublicIpAddress, xyz.northus.cloudapp.azure.com
- The DNS name for a different PublicIpAddress in the same subscription, such as xyz2.westus.cloudapp.azure.com
- A vanity DNS name or a custom DNS name, such as xyz.contoso.com, so long as this name is first configured as a CNAME to xyz.northus.cloudapp.azure.com, or to a different PublicIpAddress in the same subscription.
- A vanity DNS name or a custom DNS name, such as xyz.contoso.com, so long as this name is first configured as an A record to the IP address 23.96.52.53, or to the IP address of a different PublicIpAddress in the same subscription.
To add reverse DNS to an existing PublicIpAddress, you need to make sure that the Public IP address has a DNS name.
Since you are not comfortable with PowerShell, I'm sharing the detailed steps that I followed in my own lab to configure a custom reverse DNS for my VM's static Public IP that you can refer.
NOTE: In case you just want to create a Reverse DNS with the default Azure DNS such as domainname.northus.cloudapp.azure.com, then follow the steps 1 & 3 only. But if you own a custom domain and would like to create a Reverse DNS with the custom/vanity DNS name such as xyz.yourdomain.com, then follow all the steps below.
I have a custom domain "msazurelabs.tk" and wanted to use this domain to setup as a reverse DNS for my Azure VM's static Public IP, so below are the steps that I followed to configure a custom reverse DNS:
1) First add a DNS label for the Public IP address for which you want to create a PTR record. You can do this either via Azure portal or using the PowerShell commands:
2) Once the DNS name of the Public IP address is configured and replicated, you will have to go to your DNS provider where you have bought and own the domain and create an A record for the custom DNS to point to the Public IP address or a CNAME record pointing to the Public IP’s DNS name as below:
3) Once the A record or CNAME record is configured & replicated, you can go ahead and set Reverse DNS as follows:
$pip = Get-AzPublicIpAddress -Name "vm2publicip" -ResourceGroupName "Training-Lab"
$pip.DnsSettings.ReverseFqdn = "msazurelabs.tk"
Set-AzPublicIpAddress -PublicIpAddress $pip
It should execute successfully and give the following output:
Name : vm2publicip
ResourceGroupName : Training-Lab
Location : eastus
ProvisioningState : Succeeded
Tags :
PublicIpAllocationMethod : Static
IpAddress : 52.168.167.212
PublicIpAddressVersion : IPv4
IdleTimeoutInMinutes : 4
IpConfiguration : {
"Id": "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/Training-Lab/providers/Microsoft.Network/networkInterfaces/vm2269/ipConfigurations/ipconfig1"
}
DnsSettings : {
"DomainNameLabel": "msazurelabs",
"Fqdn": "msazurelabs.eastus.cloudapp.azure.com",
"ReverseFqdn": "msazurelabs.tk"
}
Zones : {}
Sku : {
"Name": "Basic",
"Tier": "Regional"
}
IpTags : []
ExtendedLocation : null
NOTE: It may take some time to replicate the settings on your custom domain and then you can verify the same using Digwebinterface as below.
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.