[KLUG Members] Secondary DNS via VPN

Adam Tauno Williams members@kalamazoolinux.org
18 Apr 2003 12:38:38 -0400


Here is a niggle I've had for a long time, but just lived with; in fact
I got around it by just adding important hosts to my /etc/hosts file. 
But now that other users are trying out Linux I'd like to have a real
solution.

My PC/laptop is on my net at home, which is whitemice.org and has a DNS
server at 192.168.3.1.  Everything updates from DHCP once the correct
option is selected in System Settings/Network.

Now I VPN to work which is 192.168.1.x and the domain
morrison.iserv.net.  

So of course typing kohocton, or even kohocton.morrison.iserv.net, into
my web browser doesn't work.  Typing in http://192.168.1.5 does, and so
does adding "192.168.1.5 kohocton kohocton.morrison.iserv.net" to
/etc/hosts

Now the PPP connection dishes out via the usepeerdns option a file int
/etc/ppp called resolv.conf, it contains "nameserver 192.168.1.9"  But
the system is looking at /etc/resolv.conf and in order to continue to
work with whitemice.org stuff it needs to.

On a Windows client this secondary naming thing isn't a problem and just
seems to be magically taken care off.

Are there any scripts, etc..., approved way of shoe horning
/etc/ppp/resolv.conf into /etc/resolv.conf, and of automatically
removing the entries when the PPP (VPN) link goes down?

I'd rather not hack it if something "official" and elegant already
exists that I'm just not aware of.