Connect to Cisco VPN from Ubuntu using PCF file

Virtual Private Network (VPN) is a great option to access to your office resources from home in secure way and Cisco VPN is one of more efficient and robust type of VPN.

Cisco VPN configuration can be setup in 2 ways: using authentication data or PCF file.

In this article, we will describe how to setup Cisco VPN using PCF on an Ubuntu system.

First of all, we need vpnc client, so let’s open a terminal and digit:

$ sudo apt-get install vpnc

Now we will use a little tool to convert PCF file released by our VPN administrator into a configuration file:

$ pcf2vpnc ciscovpn.pcf ciscovpn.conf

This operation will produce a new file with content like this:

## generated by pcf2vpnc
IPSec secret A@BB@vrrav22ve2

Xauth password
Xauth username

in which we have to add our VPN username and password.

At this point, we can start VPN connection using the command:

$ sudo vpnc /path/to/ciscovpn.conf

And disconnect it using:

$ sudo vpnc-disconnect