access internal domains through VPN without using the internal DNS server
by vincix from LinuxQuestions.org on (#566AV)
I'm guessing this isn't a very unsual problem sysadmins have had to deal with: a client wants to have access to an internal network and also to its internal resources making use of DNS domains which are available only for that network, but it doesn't want route all its internet traffic through the VPN, and it also doesn't want to use the DNS server provided by the VPN server, so that it can be as independently as possible from the VPN connection, in case there are interruptions.
In our case there's a Sophos router offering VPN through OpenVPN and Linux Desktop clients.
But the fact that it's Sophos is, let's say, a little bit less relevant. I would first like to know how people usually approach this problem. Changing /etc/hosts through scripts dynamically when a client connects to the VPN, for instance? Could that be somehow pushed by the server? Any suggestions?


In our case there's a Sophos router offering VPN through OpenVPN and Linux Desktop clients.
But the fact that it's Sophos is, let's say, a little bit less relevant. I would first like to know how people usually approach this problem. Changing /etc/hosts through scripts dynamically when a client connects to the VPN, for instance? Could that be somehow pushed by the server? Any suggestions?