resolve.conf changes when using vpn ----------------------------------- If You use DHCP to assign IP addresses to the NIC's, then the resolve.conf might change to Your DHCP settings every once in a while. When starting the VPN client, it saves the current resolve.conf, and then makes it's own the active one. Now the DHCP system comes around again, and changes the resolve.conf once more, and presto, Your vpn connection seems to be interrupted. Not a good situation. Solution: --------- Change the DHCP system, so that it only updates the resolv.conf file when an interface is BOUND, that is, when the interface get's it's IP address from the DHCP server. 1. Change to /etc/dhcp3/dhclient-enter-hooks.d 2. Make a new file: make_resolv_conf 3. In the file enter the following: echo $@ > /tmp/make_resolv_conf.log env >> /tmp/make_resolv_conf.log set >> /tmp/make_resolv_conf.log 4. Save and exit. 5. ifdown ; 6. ifup 7. Edit the make_resolv_conf file again. 8. Insert content of /tmp/make_resolv_conf.log 9. Delete everything, except the make_resolv_conf function. 10. In the beginning of the function insert the following: if [ $reason != "BOUND" ]; then return; fi 11. Restart interface (ifdown ifup) That's it, You have now redefined the make_resolv_conf function to only run when the reason it's run is that it's in the BOUND mode. Gotcha: ------- You need to take the interface specifically down and up if You dynamically change networks. It should however work with Your vpn client.