Azure App Service internal DNS resolution

Viewed 12686

I have an Azure Web App that communicates with a 3rd party system thru VPN / VNET integration. Part of that communication relies on being able to resolve a DNS name.

When the app is deployed to a virtual machine, we just update the hosts file with an entry like

123.45.67.89 RPGMDR500-0R

and the communication works fine. Because of the way the communication is setup, I cannot just use the IP address in code. In the communication the DNS name is sent back to us and we have to resolve it to that ip address.

Is there a way to do this with just an App Service? Effectively, we want the app to resolve this custom dns name to the ip address.

UPDATE I updated our VNET DNS Servers to use a Virtual Machine setup for DNS.

VNET using DNS

Using nameresolver, I can see that the DNS is reaching the app service, but only if I specify the DNS IP address. By Default, it is still using a Default Server (which not sure how). (sorry for the blackouts, not sure how sensitive those datas are).

nameresolver

5 Answers

Here is documentation for the Azure app service that are accessing the VMs in the network. It is said that you will need dedicated DNS server to be set up if app service and VMs are in different networks.

However I did not tried it and I have heard complains that we don't have this option to sync network using VNET Integration

You can add role DNS server to a Vm in the same vnet the webapp has access to. Set that DNS server up to just forward all requests to the AAD DNS servers in the other vnet.

Related