Azure Active Directory Domain Services DNS Forwarding

1.6k views Asked by At

Background:

We recently set up Azure Active Directory Domain Services for several Azure Virtual Machines. The domain name we used is mycompany.com and the virtual machines are machine01 and machine02. We also have several websites using the same domain such as www.mycompany.com or faq.mycompany.com.

The issue:

There are several scheduled tasks running on these virtual machines which screen scrape the websites with the same domain name. The scheduled tasks running locally are unable to resolve dns for something like www.mycompany.com or faq.mycompany.com.

C:\windows\system32>ping www.mycompany.com
Ping request could not find host www.mycompany.com. Please check the name and try again.

The dns names resolve just fine outside of the virtual machines. Dns names such as machine01.mycompany.com or machine02.mycompany.com also resolve correctly on the virtual machine:

C:\windows\system32>ping machine01.mycompany.com    
Pinging machine01.mycompany.com [10.0.3.9] with 32 bytes of data:
Reply from 10.0.3.9: bytes=32 time<1ms TTL=128

I am thinking Active Directory is seeing the mycompany.com and only resolves it internally and does not try to resolve a name such as faq.mycompany.com beyond the domain server. I believe I could normally add a forwarder to Active Directory DNS to solve this issue. But how do I get dns to forward with Azure Active Directory Domain Services?

**** EDIT 2019-02-07 ****

I did find how to administer the Azure AD Domain Services domain for a domain connected virtual machine. This article shows how to add the DNS manager: https://learn.microsoft.com/en-us/azure/active-directory-domain-services/active-directory-ds-admin-guide-administer-dns

But we should have configured the Azure Active Directory Domain Services domain as something like corp.mycompany.com instead of just mycompany.com.

So the solutions we have are:

  • Add an alias into dns
  • Edit the local hosts file
  • Delegate a sub-domain

Adding an alias into DNS worked for us and is the solution we are going to go with.

1

There are 1 answers

2
4c74356b41 On

While I have no direct answer to your question, you can work around by populating hosts files on the nodes to "skip" dns resolution