On Windows I work remotely using Cisco VPN Client. I tried Cisco Client on Linux but was unable to build and install it. So I decided to use alternative way: VPNC.
First of all, I installed VPNC using this command:
$ sudo apt-get install vpnc
When you try to connect to a cisco VPN by typing :
$ sudo vpnc
vpnc will look for the files /etc/vpnc.conf or /etc/vpnc/default.conf. If it does not find such files, vpnc will default to the interactive mode.
However, vpnc can support different configuration files and be called with the name of the file as an argument. For instance, if you create the configuration file /etc/vpnc/myconf.conf, you will be able to call vpnc like this:
$ sudo vpnc myconf
I already had office.pcf file with all required settings and I found out that I can convert this Cisco Client profile file to *.cfg file for VPNC. It can be performed by pcf2vpnc script. Steps to run it:
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
After these steps we have cisco-decript compiled. Next we need to download pcf2vpnc to convert pcf files into vpnc configuration format:
$ wget http://svn.unix-ag.uni-kl.de/vpnc/trunk/pcf2vpnc
$ chmod +x pcf2vpnc
$ sudo cp pcf2vpnc /usr/bin
Now we have cisco-decript and pcf2vpnc in /usr/bin. Let’s convert existing pcf file to conf:
$ pcf2vpnc office.pcf > office.conf
$ sudo cp office.conf /etc/vpnc/
Now we can connect to office VPN:
$ sudo vpnc office
To disconnect enter:
$ sudo vpnc-disconnect
Unfortunately, there is problem with resolving hosts by names (DNS), so I have to connect by IP addresses.