I need help with a PTR record

Prometheus Systems 20 Reputation points
2025-02-26T15:38:29.6966667+00:00

I've put a small mail server on the Azure free tier to experiment with the Azure cloud services.

How do I setup a PTR record :

http://242.5.219.4.in-addr.arpa <===> http://mail.prometheus-systems.co.za

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
738 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Venkat V 775 Reputation points Microsoft External Staff
    2025-03-03T17:13:17.9533333+00:00

    Hi @Prometheus Systems

    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:

    enter image description here
    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.