DNS problems when connecting via VPN
Solution 1:
When your VPN is disconnected, your client's resolver uses your home DNS server to resolve names. When you try to access the hostname router
, it uses the search path and asks your server for the address of router.dailey.home.com
, and all is well.
When your VPN is connected, your VPN client and network settings point your client's resolver to your work DNS server. When you try to access the hostname router
, your computer asks your work DNS server for the address of router.dailey.home.com
. Since, as you've noted, the authoritative servers for the home.com
domain return a valid answer for that domain name, the resolver stops there. If, instead, you changed your domain name to something not resolvable by Internet DNS servers, such as home.local
, your work DNS server would still have no way of resolving router.home.local
to an IP address, and would likely return an authoritative NXDOMAIN answer, i.e. "this domain does not exist." This configuration would fix your inability to reach intranet hosts without fully qualified names, since your client would proceed to the next element of your search path, but you still wouldn't be able to reach your home machines.
The best solution I can think of is to set up your client to prefer your Local Area Connection 2 (Control Panel > Network and Internet (View network status and tasks)> Change adapter settings; press Alt and choose Advanced Settings; and then modify the adapter order), and then to configure your DNS server to delegate responsibility for the pacs.local
domain to your work DNS server. This arrangement still has the problem that you won't be able to get to any Internet-facing machines in pacs.local
when your VPN is not connected, but given that the TLD is .local
, I expect that won't be a problem. You may possibly still run afoul of requirements from your VPN client.