Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 158428 - vpnc-script messes with /etc/resolv.conf unconditionally
Summary: vpnc-script messes with /etc/resolv.conf unconditionally
Alias: None
Product: Fedora
Classification: Fedora
Component: vpnc
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
: 158429 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2005-05-22 06:21 UTC by Alexandre Oliva
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-05-23 14:58:57 UTC

Attachments (Terms of Use)

Description Alexandre Oliva 2005-05-22 06:21:17 UTC
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 07:07:55 UTC
*** Bug 158429 has been marked as a duplicate of this bug. ***

Comment 2 Tomas Mraz 2005-05-23 14:58:57 UTC
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.