Welcome to the Microsoft Q&A Platform.
Thank you for reaching out, and I hope you are doing well.
az network public-ip show --ids $(az network public-ip list --query "[?ipAddress=='4.X.X.242'].id" --output tsv) --query "reverseFqdn" --output tsv
If the above query is still displaying a blank result insteadreverseFqdn
, you can check all DNS settings using the command below
az network public-ip show --ids $(az network public-ip list --query "[?ipAddress=='20.X.X.164'].id" --output tsv) --query "dnsSettings"
If it is showing the reverseFqdn in the output, you can filter it using the command below.
az network public-ip show --ids $(az network public-ip list --query "[?ipAddress=='20.X.X.164'].id" --output tsv) --query "dnsSettings.reverseFqdn"
Output:
Update Public IP
az network public-ip update -g MyResourceGroup -n <name of the public IP address> --dns-name <Globally unique DNS entry.>
Reference: Update a public IP resource with a DNS name label and static allocation.
Powershell script to configure the PTR record:
$pip = Get-AzPublicIpAddress -Name "YourPublicIPName" -ResourceGroupName "YourResourceGroupName"
$pip.DnsSettings.ReverseFqdn = "venkatthej.shop"
Set-AzPublicIpAddress -PublicIpAddress $pip
Follow the link: https://learn.microsoft.com/en-us/answers/questions/564126/how-to-create-a-ptr-record for the same related issue.
I hope this helps to resolve your issue.
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.