Kyle Brandt

Original computing and productivity articles by a Linux administrator

How-To: Connect to a Cisco VPN with Ubuntu using Vpnc

I have seen a lot of posts out there about people having headaches connecting to Cisco VPNs using the Cisco VPN Client, mostly because they have trouble compiling it in Ubuntu Feisty Fawn. I recommend using the open source alternative vpnc. Vpnc works with the following according to the previous link:

  • Cisco VPN concentrator 3000 Series
  • Cisco IOS routers
  • Cisco PIX / ASA Zecurity Appliances
  • Juniper/Netscreen

Supported Authentications: Pre-Shared-Key + XAUTH, Pre-Shared-Key
Supported IKE DH-Groups: dh1 dh2 dh5
Supported Hash Algo (IKE/IPSEC): md5 sha1
Supported Encryptions (IKE/IPSEC): (null) (1des) 3des aes128 aes192 aes256
Perfect Forward Secrecy: nopfs dh1 dh2 dh5

If your workplace or school has given you .pcf file to use with your vpn, it shouldn’t be too hard to get you on your vpn:

  1. Install the vpnc client: In the terminal enter “sudo apt-get install vpnc.” Or use the synaptic package manager.
  2. Save this script to your hard drive without any extension (Such as .html). (This script was written by Stefan Tomanek, and updated by Wolfram Sang.)
  3. Make the script executable by navigating to the directory you saved it in the terminal and type “chmod +x pcf2pvnc“.
  4. Copy your pcf file to the directory of that script, in the terminal enter “./pcf2pvnc YourPcfFile.pcf NewPvncFile.conf” substituting YourPcfFile.pcf and NewPvncFile.conf with the appropriate file names for your files.
  5. Finally, in the terminal enter “sudo vpnc NewPvncFile.conf“. If all goes well it will connect to your vpn server and ask you for your user name and password.

with 6 comments

July 14th, 2007 at 3:42 pm

Posted in Linux, Networking, Ubuntu

Tagged with , ,

6 Responses to 'How-To: Connect to a Cisco VPN with Ubuntu using Vpnc'

Subscribe to comments with RSS or TrackBack to 'How-To: Connect to a Cisco VPN with Ubuntu using Vpnc'.

  1. Thank you! This tutorial helped me alot. The Cisco VPN client kept crashing my Ubuntu 7.10 all the time.
    I followed your guide and had vpnc running fine in less than 10 minutes :-) ) Nice work!

    Henrik

    28 Jan 08 at 1:26 am

  2. Hi,

    where id pcf2pvnc scipt?

    Thanks
    Manuel

    Mexe-te! Muda de Vida! Já!

    18 Feb 08 at 2:42 am

  3. I have updated the link, thank you for letting me know it was no longer valid.

    -Kyle

    Kyle Brandt

    19 Feb 08 at 5:26 am

  4. Thank you! Nice script!

    hrex

    22 May 09 at 2:26 am

  5. Is it possible to configure the Cisco VPN client on Ubuntu using a SSL cert for auth?

    How?

    Paul

    7 Aug 09 at 11:37 am

  6. Wonderful!! Thanks so much for the script, I was having trouble copying-and-pasting the group password, this took care of it for me.

    Meghan

    14 Sep 09 at 2:44 pm

Leave a Reply