Wednesday, August 3, 2011

How to install Cisco VPN on Ubuntu

On Ubuntu, you don't need to install the Cisco VPN Client: NetworkManager includes support for Cisco IPSec VPNs. This 3 steps article will walk you through a successful installation and configuration of your VPN client.

If you encounter any issues, or need more details, make good use of the comments form at the end.

Step 0: Authentication details

First of all, make sure you have your authentication details at hand!

Step 1: Install vpnc

Ubuntu ships by default with the plugin for the Point-to-Point Tunneling Protocol (PPTP), but we need the plugin for the Cisco Compatible VPN (vpnc), that provides easy access to Cisco Concentrator based VPNs.

To install the vpnc plugin, open your terminal and run:

sudo apt-get install network-manager-vpnc

Is your Ubuntu version 10.10 or older?

Installing the Cisco VPN client on a kernel older than 2.6.38+, will result in compilation errors: the cisco_ipsec module crashes and the system is only of limited use.

The working solution is to:

  1. download the vpnc client source,
  2. apply this patch for the vpnc client,
  3. and follow the next steps for setting up your VPN.

Step 2: Setting up your VPN

Find Network Connections in your Dash, and in the VPN tab select Import to choose your .pcf file, or Add if you want to manually enter your authentication details from Step 0.
Adding a new Cisco VPN connection on Ubuntu

Step 3: Use Only as Needed

In the configurations, make sure to go to the IPv4 Settings tab, click on Routes and activate the option to use the VPN connection only for resources on its network,
unless you want all your traffic to be significantly slowed down.
Only use the VPN connection for resources on its network

You might want to reboot your machine, and you're good to go. Give it a try!


  1. This is a great tutorial. Well written and well documented. I've just stumbled on it at Dzone. I have an Ubuntu sandbox at home that I am playing with. I'll try installing Cisco VPN on it using your instructions!

  2. This it just now and it works! I did get the following error at first: The VPN Connection 'Test VPN' failed because there were no valid VPN secrets.

    I solved this by restarting the network-manager:
    sudo /etc/init.d/network-manager restart

  3. Excellent. It works without problems.

  4. Thank you. I can connect now but I can't open any internal websites (it redirects me to and I can't access the Windons network. Any ideas of what I should look at would be much appreciated

  5. Wow...Thank you sooo much!!! Spent hours trying to get this working and these 3 simple steps did it for me! Ubuntu 11.04 (with Unity) 32 bit

    p.s: this is my 2nd day using Ubuntu and I needed this VPN client for work :) If I can get it to work, so can you!

  6. Thanks for this guide.

    I am getting a popup asking me to "You need to authenticate to access the Virtual Private Network 'name of my work vpn'"

    What exactly is it asking for?

  7. @Juan, could you give more details for the settings you use?

  8. Hey, I am having an issue with this on 11.04...I installed VPNC and inputed all my companies Cisco VPN info and the VPN seems to connect but I cannot ping any internal IPs, remote desktop to my PC, or access internal websites...Any ideas? :(

  9. yes, thanks a muito tempo estava procurando isto... Obrigado e abraços

  10. great great and great, at home :

    merveilleux simple et clair ;-)


  11. thanks Marius Butuc for your guide.

    Thats work well.

    i have problem sama as jzuijlek : The VPN Connection 'Test VPN' failed because there were no valid VPN secrets.

    then i restart my ubuntu an try to connect.

  12. If my kernel is 2.6.38-8-generic will I need the patch?