2
votes
  • VM and App Service are located in the same Virtual Network.
  • App Service is added to VM through VNet Integration (preview)
  • VM is autoregistered in Private DNS zone, say by name myvm1. And full name myvm1.priv.zone
  • Private DNS zone is linked to Virtual Network.
  • Virtual Network - DNS Servers is set to default.
  • VM and App Service were restarted after configuration.

Problem is I can resolve neither myvm1 nor myvm1.priv.zone from App Service console by nameresolver.exe

UPDATE: Actually, the issue is even bigger. App Service is not able to send requests to VMs in Virtual Network by their Private IPs (10.1.x.x) even if everything is allowed on VMs' subnet. If the same requests are sent to VMs' Public IPs there is no problem. VNET Integration settings

2

2 Answers

2
votes

As the existing answer, for scenario Name resolution from App Service Web Apps to VMs in the same virtual network. in this DOC, you need to deploy your own DNS server to help name resolution.

Here are the steps:

  1. On the Azure VM in the VNet, add a server role DNS server, after the installation, configure the DNS server, add Zone name such as qaz.lab in my example. You also can manually add an A record for your Azure VM in this Zone. enter image description here
  2. Add the DNS server private IP address in the custom DNS server of Azure VNet. Then restart the Azure VM to make it effective. enter image description here
  3. Configure VNet Integration with your app, in this case, select the new VNet integration. After that, refresh your VNet Integration. You will see the DNS server update in your app service plan --- networking. enter image description here
  4. Navigate your app service, run nameresolver FQDN to validate the DNS resolution. Currently, It only supports FQDN resolution. enter image description here

Let me know if you have any question.

0
votes

As of today, you need to use DNS proxies or forwarders to achieve your ask. It is documented here in the scenario table.

For scenario "Name resolution from App Service Web Apps to VMs in the same virtual network.", the solution is to "Customer-managed DNS servers forwarding queries between virtual networks for resolution by Azure (DNS proxy)."

On How to perform "Name resolution with your own DNS" check here, where your scenario is described.