Friday, October 22, 2010

Cisco VPN in Ubuntu 10.10

Since I upgraded to ubuntu 10.10, my Cisco VPN stopped working. I needed to find a way to convert .pcf file so that I could work with vpnc.

1. Install vpnc.
sudo apt-get install vpnc

# Get the cisco decrypt program
wget http://www.debuntu.org/files/cisco-decrypt.c

# Get the dependencies needed for it
sudo apt-get install libgcrypt11-dev

# Compile it into a binary
gcc -Wall -o cisco-decrypt cisco-decrypt.c $(libgcrypt-config –libs –cflags)

chmod +x cisco-decrypt

# Move it to a place in our path
sudo cp cisco-decrypt /usr/bin

2. Download the pcf2vpnc perl script.
wget http://svn.unix-ag.uni-kl.de/vpnc/trunk/
or, wget http://svn.unix-ag.uni-kl.de/vpnc/trunk/pcf2vpnc
or, wherever you can find it!


3. Make the script executable.
chmod +x pcf2vpnc
sudo cp pcf2vpnc /usr/bin


4. Convert your .pcf files to work with vpnc.
# Run the converter, which will call the decrypt program
./pcf2vpnc cisco.pcf > cisco.conf

5. Copy your new .conf files to /etc/vpnc.
sudo cp cisco.conf /etc/vpnc/

6. Connect using vpnc.
sudo vpnc-connect cisco

Then I got this error:
vpnc-connect: Error binding to source port. Try '--local-port 0'
Failed to bind to 0.0.0.0:500: Address already in use.

So, I tried:
sudo vpnc-connect cicso --local-port 0

And, it worked.


7. To disconnect your vpn tunnel.
sudo vpnc-disconnect

1 comment :

Unknown said...

I also had problems with this, thank you very much for sharing that one line solution.
us vpn