vpnc: no internet connection

I’m posting mostly for my own documentation. I have had this happen to me twice now and both times I had to google for the answer (and the solution isn’t obvious). Hopefully it will be useful to others.

Problem: when connected to a network with vpnc and the process dies unexpectedly, connection to the internet is lost.

solution: “mv /etc/resolv.conf.netconfig /etc/resolv.conf”

thoughts: when vpnc is disconnected normally (vpnc disconnect), the above happens naturally. However, when it dies this doesn’t happen.

This is just a guess on my part so feel free to comment if you think/know otherwise.

Regards.

So sometimes when I restore the /etc/resolv.conf file I still don’t get my internet connection back; I’ll have to restart the computer. Do I have to refresh the connection somehow?