Bug 146555 - [RFE] [PATCH] vpnc ifup support
Summary: [RFE] [PATCH] vpnc ifup support
Alias: None
Product: Fedora
Classification: Fedora
Component: vpnc (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact:
Whiteboard: bzcl34nup
Depends On:
TreeView+ depends on / blocked
Reported: 2005-01-29 16:28 UTC by Bastien Nocera
Modified: 2008-08-02 23:40 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-04 11:10:47 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
/etc/sysconfig/network-scripts/ifup-vpnc (3.13 KB, text/plain)
2005-01-29 16:29 UTC, Bastien Nocera
no flags Details
/etc/sysconfig/network-scripts/ifdown-vpnc (1.12 KB, text/plain)
2005-01-29 16:30 UTC, Bastien Nocera
no flags Details
/etc/sysconfig/network-scripts/ifup-vpnc (3.16 KB, text/plain)
2005-01-31 22:39 UTC, Bastien Nocera
no flags Details
/etc/sysconfig/network-scripts/ifdown-vpnc (1.12 KB, text/plain)
2005-01-31 22:40 UTC, Bastien Nocera
no flags Details
new ifup-vpnc (3.35 KB, text/plain)
2005-02-01 02:49 UTC, Bill Nottingham
no flags Details
new ifdown-vpnc (1.09 KB, text/plain)
2005-02-01 02:50 UTC, Bill Nottingham
no flags Details

Description Bastien Nocera 2005-01-29 16:28:12 UTC
The following patch allows to connect to a VPN using a simple "ifup tun0".

Example configuration file (/etc/sysconfig/network-scripts/ifcfg-tun0):
GATEWAY=<VPN gateway>
IPSECID=<IPSec ID of the network
DNS2=<backup DNS, optional>
USEUDP=<whether to use Cisco's UDP encapsulation>

A keys-tun0 in the same directory contains:
IPSECSECRET=<secret of the network>
PASSWORD=<user's password>

Comment 1 Bastien Nocera 2005-01-29 16:29:06 UTC
Created attachment 110386 [details]


Comment 2 Bastien Nocera 2005-01-29 16:30:02 UTC
Created attachment 110387 [details]


Comment 4 Bill Nottingham 2005-01-31 20:36:45 UTC
It looks reasonable. However, unless we ship vpnc, this should
probably live with the vpnc package in extras.

Comment 5 Bastien Nocera 2005-01-31 21:11:12 UTC
Reassign to vpnc

Comment 6 Bastien Nocera 2005-01-31 22:39:31 UTC
Created attachment 110466 [details]

- support more "tun" devices than "tun0"
- override device with DEVICE=
- make sure no questions get asked with the --no-inter option

Comment 7 Bastien Nocera 2005-01-31 22:40:38 UTC
Created attachment 110467 [details]

- don't exit with status = 1 when cleaning up, but do so if no vpnc are running

- fix the "ourself" variable

Comment 8 Bastien Nocera 2005-01-31 22:43:08 UTC
Updated "docs".

Example configuration file
DEVICE=<device, optional, tun0 by default>
GATEWAY=<VPN gateway>
IPSECID=<IPSec ID of the network>
DNS2=<backup DNS, optional>
USEUDP=<whether to use Cisco's UDP encapsulation>

A keys-tun0_location in the same directory contains:
IPSECSECRET=<secret of the network>
PASSWORD=<user's password>

Tomas, Bill, what do you reckon, code-wise?

Comment 9 Bill Nottingham 2005-02-01 01:46:33 UTC
- it should use change_resolv_conf
- I don't like the idea of leaving the password on the filesystem *at all*
- in testing here, it decided to route all the traffic through the
VPN. Which broke things.
- keys-XXX reading is currently broken due to a 'cleanup' from last
october in initscripts. Grrr.

Comment 10 Bill Nottingham 2005-02-01 02:49:46 UTC
Created attachment 110477 [details]
new ifup-vpnc

Some changes:

1) use IPSECGATEWAY, not GATEWAY - GATEWAY can seriously confuse other scripts
2) support DEFROUTE on whether or not to use it as a default route
3) add a PROMPT: - prompt for not-provided info (like, say, password :) )
4) use already existing initscripts facilities for setting the default route &
modifying resolv.conf

Comment 11 Bill Nottingham 2005-02-01 02:50:50 UTC
Created attachment 110478 [details]
new ifdown-vpnc

Comment 12 Matthew Miller 2005-02-01 03:58:03 UTC
> - I don't like the idea of leaving the password on the filesystem
> *at all*

I totally agree. We use campus-wide kerberos passwords here, and it'd
just be too tempting for people to leave their passwords lying around
-- even on machines which might have multiple admins. Sure, someone
with root access and malicious intent could harvest other people's
passwords in other ways, but with this, they could easily be exposed
by accident and without leaving even a slight trace. 

Comment 13 Bill Nottingham 2005-02-04 01:15:13 UTC
Probably want to s/USER/IPSECUSER/ on the config/script as well, to
avoid collisions with 'normal' bash environment variables.

Comment 14 Bastien Nocera 2005-02-14 08:47:32 UTC
Bill's version of the scripts won't restore resolv.conf if
/etc/sysconfig/network-scripts/ifdown-post isn't modified to restore it:

-if [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" ]; then
+if [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" -o "${DEVICETYPE}" =
"vpnc" ]; then

Comment 15 Bill Nottingham 2005-02-14 18:08:16 UTC
Actually, check the ifdown-post in HEAD; that's more correct.

Comment 16 Bastien Nocera 2005-05-10 21:55:55 UTC
Tomas, could you check those scripts in for FC4?

Comment 17 Ivan Gyurdiev 2005-07-27 11:46:08 UTC
The current version of vpnc will not restore resolv.conf.

What it seems to do is...modify resolv.conf, write the result to 
/etc/resolv.conf.pre-tun0 *after* modifying it. It looks like this:

#@VPNC_GENERATED@ -- this file is generated by vpnc
# and will be overwritten by vpnc
# as long as the above mark is intact
search Belkin

The search line is unchanged, but the nameservers have been altered.
The file in resolv.conf says:

search corp.redhat.com redhat.com

Then it restores the pre file on ifdown, leaving me without a working DNS server.

Comment 18 Christian Iseli 2007-01-17 23:20:31 UTC
FC3 and FC4 have now been EOL'd.

Please check the ticket against a current Fedora release, and either adjust the
release number, or close it if appropriate.


Your friendly BZ janitor :-)

Comment 19 Bastien Nocera 2007-01-17 23:22:52 UTC
Still current.

Comment 20 Bug Zapper 2008-04-04 01:53:43 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 21 Tomas Mraz 2008-04-04 09:20:50 UTC
So do we still care about this? Isn't the vpnc support in NetworkManager good

Comment 22 Bastien Nocera 2008-04-04 11:10:47 UTC
NM's support is good enough.

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