Yovav
Yovav

Reputation: 2777

How to verify that Azure Reverse DNS is working properly?

I just got a static IP and ran the command below to get a reserved DNS:

Set-AzureService -ServiceName "people-dns" -Description "people-dns reverse DNS" -ReverseDnsFqdn "people-dns.cloudapp.net."

Now if I run Get-AzureService it shows:

ReverseDnsFqdn : people-dns.cloudapp.net.

How can I verify that it is working properly?

(it would be nice to automate this test so I can know if it stops working too)

UPDATE : I found web sites that can check like http://mxtoolbox.com but I like to know how they do it

Upvotes: 0

Views: 710

Answers (2)

Michael B
Michael B

Reputation: 12228

Probably the most reliable way of automating this would be to write a script to run on a schedule in Azure Automation that first queries Get-AzureService for the IP Address, and then checks the reverse PTR (using the command from @Łukasz Kałużny)

[System.Net.Dns]::GetHostEntry("w.x.y.z")

If these don't match you can configure it to email or pull a webhook etc to inform you.

Upvotes: 0

Łukasz Kałużny
Łukasz Kałużny

Reputation: 114

On Windows you can use ping or nslookup in command line. w.x.y.z is ip of your service.

For ping:

ping -a w.x.y.z

For nslookup:

nslookup
set type=PTR
w.x.y.z

For automation use powershell with this command:

[System.Net.Dns]::GetHostEntry("w.x.y.z")

Upvotes: 2

Related Questions