User Tools

Site Tools


vpn_using_vpnc

VPN using VPNC

The company I'm working for is using a Cisco VPN concentrator for ingoing VPN connections to the company.
Using VPNC it's possible to connect from your Linux Fedora client.
With fedora 14 VPNC is supplied as a NetworkManager plugin in package NetworkManager-vpnc. I have although not been able to get a working VPN connection using the VPNC NetworkManager plugin.
But VPNC is working from the command line……

Installed packages:
vpnc-0.5.3-7.fc13.x86_64
vpnc-script-0.5.3-7.fc13.noarch
NetworkManager-vpnc-0.8.1-1.fc14.x86_64

The configuration file for VPNC is located in /etc/vpnc/default.conf:

#IPSec gateway my.vpn.gateway
#IPSec ID my.ipsec.id
#IPSec secret mysecret
# your username goes here:
#Xauth username 

The default parameters should be modified to reflect your site configuration. You can get the parameters from your system administrator

If you have a .pcf configuration file from a Windows installation of the Cisco VPN client, it is easiest to convert this file.

The tool used for converting is called pcf2vpnc. For some unknown reason the pcf2vpnc file (perl script) provided with fedora does not have execution rights.
Fix permissions for /usr/share/doc/vpnc-0.5.3/pcf2vpnc: chmod 750 /usr/share/doc/vpnc-0.5.3/pcf2vpnc

Convert your .pcf file:

 /usr/share/doc/vpnc-0.5.3/pcf2vpnc <path&filename_to_.pcf_file> <outputfile>

Copy the <ouputfile> file to /etc/vpnc/default.conf

If you just want to convert the enc_GroupPwd the cisco-decrypt tool can be used:

cisco-decrypt <enc_GroupPwd>

With a proper /etc/vpnc/default.conf in place start vpnc:

 vpnc --local-port 0
 

Provide your password and your are connected to the network.
If you hit ifconfig a <tun> device should apear:

tun0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
        inet addr:<ip>  P-t-P:<ip>  Mask:255.255.255.255
        UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1412  Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:500 
        RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Where <ip> is your IP on the VPN network.

To disconnect use:

vpnc-disconnect
vpn_using_vpnc.txt · Last modified: 2011/06/01 12:58 (external edit)