There's a number of moving parts here so I'll try and bullet-point the setup (PS: all of the domain names and IP addresses below are fictitious).
Azure Classic
- I have an Azure AD Domain Service for "mydomain.com".
- In the properties page for that domain service, the IP addresses are 1.2.3.4 and 1.2.3.5
- This is inside a Classic VNET (ClassicVNET) - Address space 1.2.3.0/24
Azure RM
- In AzureRM, I have a VNET (VNET1)
- On that VNET, the DNS Servers are set to my Azure Domain Service from above (1.2.3.4 and 1.2.3.5). I'm not using the "Default - Azure Provided" DNS option.
- This ARM VNET (VNET1) is peered with the the classic VNET above (ClassicVNET).
Virtual Machines (SQL)
- I have 3 VM's running SQL Server. All three VM's are in the VNET1 network so their DNS servers are 1.2.3.4 and 1.2.3.5.
- All 3 VM's are joined to the AD domain (mydomain.com).
- I used the Windows Administration "DNS tool" to create some "A" records for mydomain.com (x.y.mydomain.com and a.b.mydomain.com).
- If I do an
nslookup
on any of the VM machines for these "A" records, they resolve properly. - Since the DNS query to my "mydomain.com" domain works in the VM, I'm assuming my network connections between the two VNETs (the ARM one and the classic one) are correct.
Azure App Service
- I also have an app service (AppService1).
- In the Networking property for this app service, I've set up a VNET connection to my ARM VNET (VNET1).
- If I click on the "click here to configure" for VNET integration, I can see the DNS servers are picked up from the VNET (1.2.3.4 and 1.2.3.5)
- I have a connection string for the app service referencing "x.y.mydomain.com" but I get timeouts trying to use it.
- If I go to the Kudu console, jump to a powershell prompt and enter
nameresolver x.y.mydomain.com
I get a DNS timeout.
I can't figure out why the app service (with it's VNET integration) can't access the DNS servers but the VM's can (and the VM's and app service are both accessing the same VNET). And, yes, if I use the IP address the "A" record points to, everything works fine (so I know the app service has proper connectivity to the ARM VNET and the SQL Servers on that network).
Any ideas?