Here's the setup:
- Windows 10 1803 clients
- Server 2012R2 RRAS server
- Always On VPN device tunnel setup per these instructions, with split tunneling.
- Device VPN only has routes to 1 DC/DNS server, and our configuration manager server, so it can be managed and new users can authenticate when away from the office. When users need full access to the office network, there is a separate user VPN they can connect to. This works well, except for DNS.
- AD domain name is example.local
- Public domain name is example.com
- We use split DNS for our public domain name - so mail.example.com resolves to an internal IP address when using our internal DNS servers, and our public address from the outside world.
- I need VPN clients to resolve it to the public address. The device VPN doesn't let them talk to the internal address for mail.example.com, so they can't get their email.
- I'd also like (but not a must have) DNS resolution for local services at other locations to work properly - eg. when I'm in the offices of Other Corp, DNS for othercorp.local works even with the VPN connected.
What I want to happen:
- Queries for example.local go over the VPN to our internal DNS servers
- Everything else, including example.com, use the DNS servers provided by the LAN/Wifi connection the laptop is connected to.
- The other user based VPN (which routes all traffic over the VPN) continues to use our internal DNS servers for everything.
What I've tried:
- Setting Name Resolution Policy Table rules for example.local pointing at our internal DNS servers. This does seem to work, queries for example.local go over the VPN...but so does everything else.
- Setting NRPT rules for example.com, with blank DnsServers field, which should make sure they are excluded. Seems to have no effect.
- Setting NRPT rules for example.com, with public resolvers for the DnsServer. This does work, but breaks at remote locations that block anything but their own dns resolvers (which many of the sites my users travel to do), and doesn't solve the local services problem.
- Setting "Use the following DNS server addresses" on the VPN connection in network connections, and leaving it blank. No effect, the VPN connection still gets set to use our internal servers.
- Setting "Use the following DNS server addresses", and putting in a public DNS server like 126.96.36.199. When connected, I end up with 3 DNS servers on that interface, with our internal ones at the top and 188.8.131.52 at the bottom of the list.
I suspect that if I could get the VPN to not list any DNS servers at all, the NRPT rules would kick in just for example.local, and everything would work properly. But I can't find a way to make it not use the ones provided by the RRAS server.