Installing VPN PCF files on Ubuntu 13.04


I have a client who uses a Cisco VPN to protect their network, and I exclusively use Ubuntu in my consulting work. At the moment, they don't easily work together out-of-the-box, even though they should. To get access to their network, I was provided with a PCF file, used to configure VPN client software to connect to the VPN server. However, after importing the configuration file, I simply couldn't connect.

In theory, you can use the standard NetworkManager utility to connect to your Cisco VPN, but it doesn't actually work. I've outlined the process that's supposed to work, and the one that's necessary to actually make it happen.

Using the GUI to connect to a Cisco VPN

Note: You can skip the first seven (7) steps if you're comfortable running "sudo apt-get install network-manager-vpnc-gnome" from the command-line interface.

  1. Open the Ubuntu Software Centre
  2. In the search box, type "network-manager-gnome".
  3. When "Network (network-manager-gnome)" comes up, select it.
  4. Hit its "More Info" button.
  5. Check the "Network management framework (VPNC plugin GNOME GUI) (network-manager-vpnc-gnome)" check box.
  6. Hit the Apply Changes button.
  7. Authenticate with your password if required.
  8. Click on the Network Manager applet icon in the status bar » VPN Connections » Configure VPN...
  9. Hit the Add button.
  10. Under VPN, select "Import a saved VPN configuration...".
  11. Select your PCF file and hit Enter.
  12. Enter your user name and user password.
  13. On the General tab, uncheck "All users may connect to this network".
  14. On the IPv4 Setting tab, click on "Routes...", and then check "Use this connection only for resources on its network". Hit OK.
  15. Hit the Save button.

The above recipe doesn't actually work for me as I keep running into the bug I filed, NetworkManager can't connect to Cisco VPN.

Using the Command-Line Interface

I was, however, able to connect using the command-line vpnc client. It took a bit of research, but here's what did the trick:

  1. Install the command-line client.
    • sudo apt-get install vpnc
  2. Convert the PCF file to a native configuration file.
    • pcf2vpnc NETWORK.pcf NETWORK.conf
  3. Secure the credentials from prying eyes.
    • chmod 600 NETWORK_NAME.conf
  4. Edit the NETWORK_NAME.conf file to add your username and password.
  5. Start it with:
    • sudo vpnc /path/to/vpn/configs/NETWORK/NETWORK.conf
  6. If it doesn't work, add the "--enable-1des" option, but make sure to tell the system administrator(s) that they need to upgrade their configuration as it's not as secure as it could be.
    • sudo vpnc --enable-1des /path/to/vpn/configs/NETWORK/NETWORK.conf
  7. Terminate your connection as needed.
    • sudo vpnc-disconnect


The following blog posts were helpful in getting things up and running:


still not working

I enter my username and password but then it asked for a VPN password and I have no idea what that could be. If I enter a blank password it idles for a minute and says "no response from target". Anyone have thoughts on why that is?

pcf2vpnc error .TH and .SH --> command not found

root@sebaquadri-VirtualBox:/home/sebaquadri# ls -l
total 220
-rw-r--r-- 1 root root 0 Apr 23 07:13 converts
drwxr-xr-x 2 sebaquadri sebaquadri 4096 Sep 23 2014 Desktop
drwxr-xr-x 2 sebaquadri sebaquadri 4096 Nov 18 2013 Documents
drwxr-xr-x 2 sebaquadri sebaquadri 4096 Mar 19 14:03 Downloads
-rw-r--r-- 1 sebaquadri sebaquadri 8445 Nov 18 2013 examples.desktop
drwxr-xr-x 2 sebaquadri sebaquadri 4096 Aug 14 2014 fontconfig
-rw-rw-r-- 1 sebaquadri sebaquadri 154978 Oct 27 10:51 hrrdbt99
drwxr-xr-x 2 sebaquadri sebaquadri 4096 Nov 18 2013 Music
-rwxr-x--- 1 root root 1145 Apr 23 07:02 pcf2vpnc.1
drwxr-xr-x 2 sebaquadri sebaquadri 4096 Jul 28 2014 Pictures
drwxr-xr-x 2 sebaquadri sebaquadri 4096 Nov 18 2013 Public
drwxrwxr-x 2 sebaquadri sebaquadri 4096 Dec 4 14:34 python_scripts
drwxrwxr-x 6 sebaquadri sebaquadri 4096 Jun 13 2014 scripts
-rw------- 1 sebaquadri sebaquadri 33 Feb 25 09:44 ssh_log.log
drwxr-xr-x 2 sebaquadri sebaquadri 4096 Nov 18 2013 Templates
drwxr-xr-x 2 sebaquadri sebaquadri 4096 Nov 18 2013 Videos
-rwxr-x--- 1 root root 936 Apr 23 07:13 vpn.pcf
root@sebaquadri-VirtualBox:/home/sebaquadri# ./pcf2vpnc.1 vpn.pcf
./pcf2vpnc.1: line 1: .TH: command not found
./pcf2vpnc.1: line 2: .SH: command not found

Why am I getting this error? Could anybody please help me?

Thanks in advance...


I don Know what happens, but, the graphic connections is no working yet, thank you for the tips. Helping so much.

Add new comment