You are here: Home / Past Courses / Spring 2011 - ECPE 293B / Tutorials / Setup PacificNet Cisco VPN in Ubuntu (10.04)

Setup PacificNet Cisco VPN in Ubuntu (10.04)

Instructions to setup Cisco's vpn-client for Ubuntu

Get the .pcf file and initial setup

cd ~
mkdir pacificnet-vpn

Download vpn-students.zip from the email that OIT sent you.  Extract the files to ~/pacificnet-vpn/vpn-students (or a location of your choice).

unzip -d ~/pacificnet-vpn/vpn-students ~/Downloads/vpn-students.zip

(Note: downloaded to my default download directory.  The -d flag means different directory.)

Copy the .pcf file to ~/pacificnet-vpn

cp ~/pacificnet-vpn/vpn-students/vpn-students.pcf ~/pacificnet-vpn

Finally, create and change to vpnclient directory for the next couple of steps

mkdir vpnclient
cd vpnclient 

 

Setup Decoding Binary `cisco-decrypt'

This binary decodes the group password from your .pcf file.  Download the source file and setup the binary.

wget http://www.unix-ag.uni-kl.de/~massar/soft/cisco-decrypt.c

(If the above address does not exist, Google `cisco-decrypt.c' and you should find a suitable download.)

Install compiler dependency for decryption (if doesn't already exist).  Compile and create the cisco-decrypt binary.  Allow it to be executed.  Copy it to global execution directory.

sudo apt-get install libgcrypt11-dev
gcc -Wall -o cisco-decrypt cisco-decrypt.c $(libgcrypt-config --libs --cflags)
chmod +x cisco-decrypt
sudo cp cisco-decrypt /usr/bin 

 

Setup Decoding Script `pcf2vpnc'

A Perl script called pcf2vpnc will use cisco-decrypt.  The remainder of the script converts the .pcf to a .conf to be used by vpnc.  Download the and setup the script.

wget http://svn.unix-ag.uni-kl.de/vpnc/trunk/pcf2vpnc
chmod +x pcf2vpnc
sudo cp pcf2vpnc /usr/bin

 

Finish setup, Install vpnc and Connect

Finally, use pcf2vpnc to convert vpn-students.pcf to vpn-students.conf.  Then copy the .conf file to /etc/vpnc/.

cd ~/pacificnet-vpn
pcf2vpnc vpn-students.pcf > vpn-students.conf
sudo cp vpn-students.conf /etc/vpnc

Note: if you get the message `decoding input: No such file or directory', do not worry.  Do this simple sanity check and you should see output like the following.

cat ~/pacificnet-vpn/vpn-students.conf
## generated by pcf2vpnc
IPSec ID vpn-students
IPSec gateway vpn.pacific.edu
IPSec secret <shared 'secret' key>
IKE Authmode psk
## To add your username and password,
## use the following lines:
# Xauth username <your username>
# Xauth password <your password>

Install vpnc and connect.

sudo apt-get install vpnc resolvconf
sudo vpnc vpn-students

You will be prompted for your PacificNet login username and password.

To disconnect.

sudo vpnc-disconnect