Setup Reverse DNS entry for a server in Azure

This week I moved my mail server, running Linux, to Azure. One of the tasks was to add a reverse DNS entry for the server.

This is not something you can do in the Azure portal, it requires accessing Azure from PowerShell.

To connect PowerShell to Azure, use the Add-AzureAccount command. If you don’t have that,  install the AzureRM and Azure modules.

Finally, use the Set-AzureService to assign the reverse DNS entry to your service.

Install-Module AzureRM
Install-Module Azure

Add-AzureAccount

Set-AzureService -serviceName "Hougaard" -Description "Hougaard with Reverse DNS" -ReverseDnsFqdn "mail.hougaard.com."

Notice, that you need to add a dot (.) after the DNS name and that DNS name needs to resolve to point at the public IP of the service, either with a “CNAME” entry or directly with an “A” entry.