How to setup intranet DNS to resolve some sub domain address and forwards others?

Solution 1:

We do what you are trying to accomplish here. The trick is to set up internal DNS zones for the subdomains you wish to answer locally, not the parent domain.

Instead of making a local DNS Zone for "MyDomain.com" with entries for the subdomain, make a new zone for each subdomain.

So, you'd make a zone named "subs1.mydomain.com", and then add a single new A Record, and leave the Host name for that record as blank.

(Repeat for each subdomain you want to have that DNS server answer for).

Ensure you DO NOT have a local zone for Mydomain.com.

Once it's setup, if you request subs1.mydomain.com the local DNS knows about it, and returns the root A Record (the blank Host one you made). If you request any other subdomain of MyDomain.com it won't ben seen as a known zone by the local DNS, will be forwarded like usual, and in turn, answered by the public DNS hosting the records for MyDomain.com.