My computer is connected to the work domain, where it gets the local dns-servers along with the dhcp-settings.
For a certain customer, i'm connecting to their network using VPN (Open VPN / TAP-Device) which ofc. sets up a second ip along with their DNS Servers.
The problem i'm facing, is that Windows 10 seems to be unable to decide which DNS-Server to query: let's say the domains are
When the connection is established, windows 10 by default uses the dns-server of the remote-site, i.e.
dns1.ad.customer.com. Local DNS resolution now fails, which makes local file-shares, printers, etc. pp. inaccessible.
The problem is obviously, that the domain-names are sub-domains of a valid tld:
- The PC starts to ask the remote-dns-server for
mysite.com- which could be resolved online.
- But then ofc, the online-domain-controller responsibe for
mysite.comdoes not have any information for
ad.mysite.com, because this is only handled by the local dns-server(s)
- tracerouting any internal name shows, that windows clearly tries to resolve it this way...
If I modify the metrics of the network connections (local vs TAP) then it behaves the other way round: I'm able to access local resources even if VPN is established, but obviously i'm not able to resolve hostnames on the
ad.customer.com-domain, because now the same thing vice-versa happens:
- Windows is asking my local DNS for
- the request is forwarded to the DNS Server responsible for
cusotmer.com- which in turn is the "online-version" and not aware of the internal
Is there a way to tell Windows which Connection / DNS-Server should be used for a certain FQDN?
Or could I setup my
dc1.ad.mysite.com to respond in a way, that the client knows he needs to query
dc1.ad.customer.com (ip) instead?
(Setting up a dns-forwarder ofc. will not work, because the internal-dns servers aren't connected, since the VPN-Connection originates from my machine)
So to say, I would need DNS-Redirection, not DNS-Forwarding.
Local One is 2012 R2, if that has an impact on the options.