Consider the following scenario:
I am connected to a local area network with it's own private DNS server (call it
lan-dns). This DNS server is used to resolve the names of some private hosts on the LAN. Any other DNS requests are forwarded to a DNS server on the Internet.
I want to connect to another remote LAN via a VPN. The remote LAN also has a private DNS server (named
vpn-dnsfor arguments sake) which is needed to resolve the names of the private hosts on the remote network.
When not connected to the VPN I will be able to access the hosts on my LAN by their names. However when I am connected to the VPN then, since the DNS of the remote network overrides that on my local network, I will not be able to access the hosts on my local network.
Whilst connected to the VPN if I force my DNS server back to
lan-dnsthen I won't be able to resolve the names of hosts on the remote network.
What is the simplest way to resolve this problem? Is it even possible?
This scenario must be becoming more and more common, yet there doesn't seem to be an elegant solution that I can find.