Bug 158428 - vpnc-script messes with /etc/resolv.conf unconditionally
vpnc-script messes with /etc/resolv.conf unconditionally
Product: Fedora
Classification: Fedora
Component: vpnc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
: 158429 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2005-05-22 02:21 EDT by Alexandre Oliva
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-23 10:58:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexandre Oliva 2005-05-22 02:21:17 EDT
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):

How reproducible:

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.

Additional info:
Comment 1 Alexandre Oliva 2005-05-22 03:07:55 EDT
*** Bug 158429 has been marked as a duplicate of this bug. ***
Comment 2 Tomas Mraz 2005-05-23 10:58:57 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.