Saturday, 26 March 2011

Cisco VPN on Ubuntu 10.10 64bit Howto

So with the help of the Ubuntu guys on Linked In I have now managed to get my laptop running Ubuntu 10.10 64bit to connect via Cisco VPN.

Here is the solution to the problem.

1. Install vpnc package:
root> sudo apt-get install vpnc

2. Create the connect script, copy the contents below into a file called vpnconnect and place it on the path somewhere:

sudo vpnc --local-port 0 --enable-ldes /etc/vpnc/vpn.conf

3. Copy over the .pcf file used by the Windows Cisco VPN client and use this as a basis for step 4.

4. We now need to create the vpn.conf file in the /etc/vpnc directory. The content of this file are as follows:

IPSec ID <your ipsec id>
IPSec gateway <your gateway address>
IPSec secret <your ipsec secret>

Xauth username <your username>
Xauth password <your password>
IKE Authmode psk

You can replace <your ipsec id> and <your gateway address> with the values contained within the pcf file. For the value to go in <your ipsec secret>, you need to post the encrypted group password value from the pcf file into the form on this webpage. It will then return the unencrypted value.

<your username> and <your password> should be obvious.

You now have everything required to connect, so run the script:

user> vpnconnect

After a few seconds it should come back with the message:

VPNC started in background

And give you a process id.

You should now be connected to the VPN.


  1. This doesn't seem to work for me.. when trying to connect to my work server. One thing I notice in the .pcf file is this tcpip.tunnel.port option, that is set to 10000. I am wondering if I need that or not, but there doesn't seem to be an option for that.

  2. The script worked flawlessly, thank you for sharing it.
    us vpn

  3. Thanks for manual.Script works good.

  4. Thank you.Amazing solution for VPN.
    This client works perfect.
    Cool blog.

  5. The solution is very simple comparing to a lot of others but works flawlessly. I think it's worth adding how to disconnect. May be there is other way but personally, I'm using :
    - nmcli con
    - nmcli con down id xxx (id of your VPN connection get with above)
    - nmcli con delete xxx