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>
Created attachment 110386 [details] /etc/sysconfig/network-scripts/ifup-vpnc ifup-vpnc
Created attachment 110387 [details] /etc/sysconfig/network-scripts/ifdown-vpnc ifdown-vpnc
It looks reasonable. However, unless we ship vpnc, this should probably live with the vpnc package in extras.
Reassign to vpnc
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
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
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?
- 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.
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
Created attachment 110478 [details] new ifdown-vpnc
> - 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.
Probably want to s/USER/IPSECUSER/ on the config/script as well, to avoid collisions with 'normal' bash environment variables.
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
Actually, check the ifdown-post in HEAD; that's more correct.
Tomas, could you check those scripts in for FC4?
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.
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 :-)
Still current.
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
So do we still care about this? Isn't the vpnc support in NetworkManager good enough?
NM's support is good enough.