Configure Azure Public IP Address Reverse DNS

Michael Cockinos
4 min readJun 25, 2020

This may not be a situation you find yourself in often. Recently I discovered a few top end mail systems (Gmail, Bigpond etc) were rejecting email coming from my customers domains hosted on my Azure VM.

I was getting 550 errors, which in short, relate to not having a PTR record for the IP my VM had been allocated. I thought at first it was that the messages weren’t signed so I created SPF/DKIM records and secured the mail server better (I know, I should have done that already).

Email still wasn’t being delivered and it took a while but I came across this great video on YouTube. It helped me fix my server, and I thought I would write this blog, and maybe help someone else, in a simpler format.

So to begin with you will obviously need an Azure subscription. Initially free, so a good way to get used to the interface/portal and all of its features. Head on over to https://portal.azure.com and explore a few of their features. You probably won’t use them all, but worth a look.

I configured an Azure VM a couple of years ago and run my hosting business on there (https://www.redhot.com.au). I have a small client base but each expect a high level of service. I provide, web host, domain name purchase and email services.

That gives a little insight into how I’ve come to this point.

Before I get going, I used the Windows Power Shell on my laptop to do most of the configuration.

Azure Power Shell Icon.

You can use the power shell that comes with Azure, and that an be accessed from the top tool bar.

Open Power Shell in either Azure Portal or on your local machine. This should run as administrator.

On the Command Line, type the following commands one at a time, waiting for each to complete (deal with any errors):

Install-Module AzureRM
Import-Module AzueRM
Login-AzureRmAccount

enter your Azure account email and password then once logged in you are returned to your Power Shell and you have access to Azure through CLI.

Now type Get-AzureRmSubscription and hit enter… You should get something like this

Next, Select-AzureRmSubscription -Subscription <Your Subscription ID>

Now type Get-AzureRmPublicIpAddress -ResourceGroupName <The Resource Group YourIP Is Associated To> -Name <YourPublicIpAddressName>

for example mine is: Get-AzureRmPublicIpAddress -ResourceGroupName Default-Web-AustraliaEast -Name rh-whserv-003-ip

This info is located it in the Azure Portal. Navigate to your Virtual Machine and click on the IP address.

Then click on Properties. Once you’re there you can get the Resource group and the IP Address Name.

Add those to each position in the Azure CLI and press enter.

You will get a result similar to the one below.

The next command is a bit long winded but is the final step in creating your Reverse DNS entry for your public IP address in Azure.

New-AzureRmPublicIpAddress -ReverseFqdn <yourdomain.com> -ResourceGroupName <YOUR_RES_GROUP_NAME_HERE> -Name <YOUR_PUBLIC_IP_NAME_HERE> -Location “<LOCATION_HERE>” -AllocationMethod Static -DomainNameLabel <YOUR_LABEL>

in my case the full line was:
New-AzureRmPublicIpAddress -ReverseFqdn mydomain.com.au -ResourceGroupName Default-web-AustraliaEast -Name rh-whserv-003-ip -Location “australiaeast” -AllocationMethod Static -DomainNameLabel mydomain

running this final command sets your reverse dns and you shouldn’t have any further trouble.

I have also gone ahead and re-delegated all of my customer domain names to Azure DNS and that is in turn managed through my Plesk Portal. More on that later.

I hope this has helped.

Michael

--

--

Michael Cockinos

In the It industry since 2000. Code in ASP, HTML, dart flutter and loads of other flavours... Host websites, redhot.com.au