Bug 146555 - [RFE] [PATCH] vpnc ifup support
[RFE] [PATCH] vpnc ifup support
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: vpnc (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
bzcl34nup
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-29 11:28 EST by Bastien Nocera
Modified: 2008-08-02 19:40 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-04 07:10:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Bastien Nocera 2005-01-29 11:28:12 EST
The following patch allows to connect to a VPN using a simple "ifup tun0".

Example configuration file (/etc/sysconfig/network-scripts/ifcfg-tun0):
DEVICE=tun0
BOOTPROTO=none
ONBOOT=no
DEVICETYPE=vpnc
TYPE=vpnc
USERCTL=yes
GATEWAY=<VPN gateway>
IPSECID=<IPSec ID of the network
USERNAME=<username>
DNS1=<DNS>
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 11:29:06 EST
Created attachment 110386 [details]
/etc/sysconfig/network-scripts/ifup-vpnc

ifup-vpnc
Comment 2 Bastien Nocera 2005-01-29 11:30:02 EST
Created attachment 110387 [details]
/etc/sysconfig/network-scripts/ifdown-vpnc

ifdown-vpnc
Comment 4 Bill Nottingham 2005-01-31 15:36:45 EST
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 16:11:12 EST
Reassign to vpnc
Comment 6 Bastien Nocera 2005-01-31 17:39:31 EST
Created attachment 110466 [details]
/etc/sysconfig/network-scripts/ifup-vpnc

- 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 17:40:38 EST
Created attachment 110467 [details]
/etc/sysconfig/network-scripts/ifdown-vpnc

- 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 17:43:08 EST
Updated "docs".

Example configuration file
(/etc/sysconfig/network-scripts/ifcfg-tun0_location1):
DEVICE=<device, optional, tun0 by default>
BOOTPROTO=none
ONBOOT=no
USERCTL=yes
DEVICETYPE=vpnc
GATEWAY=<VPN gateway>
IPSECID=<IPSec ID of the network>
USERNAME=<username>
DNS1=<DNS>
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-01-31 20:46:33 EST
- 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-01-31 21:49:46 EST
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-01-31 21:50:50 EST
Created attachment 110478 [details]
new ifdown-vpnc
Comment 12 Matthew Miller 2005-01-31 22:58:03 EST
> - 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-03 20:15:13 EST
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 03:47:32 EST
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 13:08:16 EST
Actually, check the ifdown-post in HEAD; that's more correct.
Comment 16 Bastien Nocera 2005-05-10 17:55:55 EDT
Tomas, could you check those scripts in for FC4?
Comment 17 Ivan Gyurdiev 2005-07-27 07:46:08 EDT
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
nameserver 172.16.52.28
nameserver 172.16.52.27

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

search corp.redhat.com redhat.com
nameserver 172.16.52.28
nameserver 172.16.52.27

Then it restores the pre file on ifdown, leaving me without a working DNS server.
Comment 18 Christian Iseli 2007-01-17 18:20:31 EST
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.

Thanks.

Your friendly BZ janitor :-)
Comment 19 Bastien Nocera 2007-01-17 18:22:52 EST
Still current.
Comment 20 Bug Zapper 2008-04-03 21:53:43 EDT
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.
http://fedoraproject.org/wiki/LifeCycle/EOL

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:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

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 05:20:50 EDT
So do we still care about this? Isn't the vpnc support in NetworkManager good
enough?
Comment 22 Bastien Nocera 2008-04-04 07:10:47 EDT
NM's support is good enough.

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