question

AdminThomasMorel-0046 avatar image
0 Votes"
AdminThomasMorel-0046 asked suvasara-MSFT answered

Reverse DNS for VM behind an Application Gateway

I have a VM running a public website but the VM has a private internal IP and no public IP. I have an Application Gateway, with a public IP, that is the entry point for my domain being hosted on the private-IP VM.

When I send emails from my VM/s command line, I keep getting the following error:

554 Connection Denied - Reverse Lookup Failure

I reviewed the docs page that says that a reverse DNS PTR record cannot be added to an Application Gateway.

What is the workaround? Do I assign a public IP to my VM and add an MX record for that IP or how do I fix this?

azure-dnsazure-virtual-machines-networking
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AdminThomasMorel-0046 Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused. I am checking on this thread!

0 Votes 0 ·

1 Answer

suvasara-MSFT avatar image
0 Votes"
suvasara-MSFT answered

@AdminThomasMorel-0046, Apologies for the delayed response. Yes, Reverse DNS is currently not supported for the Azure App Service and Application Gateway. You need to explicitly configure your VM PIP with 'ReverseFqdn' property to enable it.

Note: Configuring reverse DNS for a Public IP address resource is currently not supported in the Azure portal.


$pip = Get-AzPublicIpAddress -Name "PublicIp" -ResourceGroupName "MyResourceGroup"
$pip.DnsSettings = New-Object -TypeName "Microsoft.Azure.Commands.Network.Models.PSPublicIpAddressDnsSettings"
$pip.DnsSettings.DomainNameLabel = "contosoapp1"
$pip.DnsSettings.ReverseFqdn = "contosoapp1.westus.cloudapp.azure.com."
Set-AzPublicIpAddress -PublicIpAddress $pip


Ref: https://docs.microsoft.com/en-us/azure/dns/dns-reverse-dns-for-azure-services

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.