Red Hat Bugzilla – Bug 158428
vpnc-script messes with /etc/resolv.conf unconditionally
Last modified: 2007-11-30 17:11:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.8) Gecko/20050512 Fedora/1.0.4-2 Firefox/1.0.4
Description of problem:
vpnc used to leave /etc/resolv.conf and routes alone. The new vpnc-script is certainly a nice improvement over having to set everything up by hand, but unfortunately it breaks arrangements in which things were set up by hand. Ideally, vpnc shouldn't change its behavior so wildly without a command-line option or something to enable the use of the new script.
Unfortunately, it doesn't look like simply removing the script or replacing it with a do-nothing script reverts to vpnc's historical behavior.
Personally, I'd really like to have some easy means to disable modification of /etc/resolv.conf. In fact, the comment vpnc-script places in it is misleading: it gives the impression that, if I change that text, it will no longer mess with the file, but it still does and, worse, it fails to preserve the original, because /var/run/vpnc, where it tries to preserve it, is not created by the vpnc rpm.
I've disabled write_resolvconf in my copy of vpnc to achieve what I wanted (my named.conf takes care of forwarding the domains I want to the vpn server, while still enabling me to resolve names in my internal home network).
Either way, I don't think overwriting /etc/resolv.conf's nameserver lines is a good idea, since it generally makes the most sense to resolve names using a local name server, and only use the vpn name server as a fallback when the local name server fails to resolve a name. I realize this wouldn't work for broken internal/external name configurations though, and perhaps not even for reasonable ones. Oh well... DNS caches for all!
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Connect to a vpnc server
Actual Results: /etc/resolv.conf fails to be backed up and is overwritten, rendering names in my internal network, that is not part of the vpn, no longer resolvable.
Expected Results: Retain historical behavior of vpnc, or introducing options in the configuration file to choose whether to replace, prepend, append or discard information such as DNS servers and routes.
*** Bug 158429 has been marked as a duplicate of this bug. ***
I agree that this behavior is annoying if you don't want it. In fact I had to
disable it too (simply by adding 'unset INTERNAL_IP4_DNS' to the vpnc-script).
The problem is that I don't want to introduce a new configuration option without
upstream adding it too.
For now I'll resolve it UPSTREAM and I'll report this problem to Maurice.