Thursday, February 24, 2011

How to setup Cisco VPN using VPNC on Ubuntu 10.10

This guide is for Ubuntu 10.10 users who want to connect to Cisco VPN using VPNC. This guide assumes you have profile file in .pcf format (we will use myoffice.pcf as an example here).

Let’s begin and follow the steps exactly replacing your own pcf file:

Open terminal and run the following commands

* Create a directory

mkdir vpnclient

Change to that directory:

cd vpnclient

* Download cisco-decrypt file which will be used to decrypt the group password from your pcf file:

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

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

* Download pcf2vpnc to convert pcf files in vpnc configuration format

wget http://svn.unix-ag.uni-kl.de/vpnc/trunk/pcf2vpnc

chmod +x pcf2vpnc

sudo cp pcf2vpnc /usr/bin

* Go to windows vpn profiles directory and convert .pcf files to .conf files

pcf2vpnc myoffice.pcf > myoffice.conf

* Note:replace above myoffice.pcf with your own .pcf file.

sudo cp myoffice.conf /etc/vpnc/

* install vpnc and connect to vpn

sudo apt-get install vpnc resolvconf

*This will install vpnc in your system. Once installed, you have to create a .conf file in /etc/vpnc/ where is the name you give (without the <>). Enter the following command to create a file called myoffice.conf

sudo vpnc myoffice.conf

Enter username for :
Enter password for :
VPNC started in background (pid: 6092)xn--

* To disconnect simply do

sudo vpnc-disconnect

2 comments:

Rajender S said...

Hi Harish,

one day I was looking for vpn settup on ubuntu, I just followed your instructions it was very help thanks, keep posting.

thanks,
Rajender.S

fozzie said...

Thanks for this.

One minor error:
pcf2vpnc myoffice.pcf > myoffice.conf
should be
pcf2vpnc myoffice.pcf myoffice.conf

David