42

I have recently installed Ubuntu 14.04 LTS on my laptop(Lenovo y560). I don't have much knowledge on this OS, can some one assist me with steps to configure Cisco VPN client on my laptop.

47

You need the Gnome package as well. So the magical incantation is this:

sudo apt-get install network-manager-vpnc-gnome

Then you can simply add a VPN connection by launching the configuration of Network Manager and importing a .pcf file with the settings. Or by using a drop-down dialog in the settings of Network Manager and adding the required information. Easy as pie...

| improve this answer | |
  • This is especially true for other flavors of Ubuntu. I was setting it up on Ubuntu-Mate, and simply installing network-manager-vpnc didn't work – Tymric Jul 2 '16 at 18:55
  • 6
    Needed this for Ubuntu 16.10, thanks! – Mycah Nov 4 '16 at 16:27
  • 1
    For Ubuntu 14.04 the Gnome package is automatically installed when doing sudo apt-get install network-manager-vpnc – DamBedEi Nov 25 '16 at 15:04
  • I had to run this command after using the sudo apt-get install network-manager-vpnc to get the GUI working to add a new VPN connection (Ubuntu 17.4). – Mycah Dec 20 '17 at 23:19
31

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

1) 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

2) 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.

3) 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.

Hope it could help.

| improve this answer | |
  • Followed steps and it connects and I type in my 2fa token key. But I cannot access any of the network IP addresses. What could I be missing? – Patoshi パトシ Jul 24 '16 at 14:50
  • I also had to run sudo apt-get install network-manager-vpnc-gnome to enable using the GUI to add a new VPN connection (Ubuntu 17.4). – Mycah Dec 20 '17 at 23:21
  • This worked, after a reboot. – Zach Boyd Dec 29 '17 at 23:28
21

You will first need to get the vpnc package and install it. Fire up a terminal and enter this command:

sudo apt-get install vpnc

You will then need to make a text file with the following information:

IPSec gateway *gateway.to.use*
IPSec ID *groupname*
IPSec secret *passwordforgroup*
Xauth username *myusername*
Xauth password *mypassword*
Domain ""

This file should have a .conf extension and should be placed under the /etc/vpnc directory e.g. /etc/vpnc/default.conf.

To connect if you have default file then no need to provide configuration file name as asked in 1st command, you will need to enter:

sudo vpnc <conf file name (without extension)>
sudo vpnc-connect (will automatically use /etc/vpnc/default.conf)

To disconnect, you will need to enter:

sudo vpnc-disconnect

You can find more details under this How-To

| improve this answer | |
  • Getting a vpnc: no response from target after setting all those settings up. I left the password option blank as it needs a 2fa token for that. – Patoshi パトシ Jul 24 '16 at 14:53
  • this worked for me where a lot of other solutions failed. I am working with a docker container and also had to use the docker run --privileged flag to get past a "can't initialise tunnel interface: Operation not permitted" vpnc error. – Scott Jungwirth Jun 11 '18 at 16:13
  • What is the "groupname"? Our admin only supplied server-name, user name & password. Seems you can't create the VPN config without it. – Kingsley Mar 23 at 0:03
2

I have tested and found below code active in ubuntu 16.x in terminals with command line. Admin can get pcf file which are already connected with Windows systems in Cisco VPN clients from Cisco Box administrators. Self creating files may waste your time due to typo errors etc.

pcf2vpnc utility in Linux will automatically convert file in Linux conf format. Yu replace it with /etc/vpnc/default.conf and just enter below command without config files like so:

sudo vpnc --enable-1des

Or without des if your Cisco system supports it:

sudo vpnc

This command will get default file from /etc/vpnc folder as described above.

sudo apt-get install vpnc

Installing VPN PCF files on Ubuntu

This will convert a pcf to a vpnc configuration:

 pcf2vpnc original.pcf new.conf

Access Cisco VPN

Instructions for VPN connection or How to Connect VPN from linux box:

sudo vpnc --enable-1des /etc/vpnc/new.conf
sudo vpnc /path/to/new.conf

How to disconnect:

sudo vpnc--disconnect

All commands are tested and verified from system.

| improve this answer | |
  • Isn't it vpnc-disconnect (with 1 dash only) ? – LatinSuD Mar 17 at 12:25
0

Note that the network-manager-vpnc may not work, but the procedure described here by seedkhan, using just vpnc may work ! This suggests that there may be a bug in network-manager-vpnc ! More on that is here and some evidence also here.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.