I am using Ubuntu 14.10 and I need to create a VPN L2TP connection.

I installed strongswan, as suggested by this answer, but now I don't understand how to configure the connection.

The connection data I have available are an Ip address, a username, a password and a preshared key.

I try to create the connection using the network manager, but I don't understard which option I have to select. First thing: do I have to create an ipsec/ikev2 or a pptp vpn? Which authentication protocol do I have to select? Where do I insert my preshared key?

Any help is appreciated


That's not the best way (because Openswan has been removed from Unicorn (14.10) by some security reasons), but it works pretty good for me:

  1. Download and install an appropriate Openswan package from the http://www.ubuntuupdates.org/pm/openswan

I use package trusty (14.04) for my Unicorn (14.10) and it works without any issues.

  1. Then you need to install Network Manager L2TP plugin. I use the bellow one, it has a version for Unicorn:

    sudo apt-add-repository ppa:seriy-pr/network-manager-l2tp
    sudo apt-get update
    sudo apt-get install network-manager-l2tp-gnome
    sudo service xl2tpd stop
    sudo update-rc.d xl2tpd disable
  2. Then just go to the Network manager, choose VPN connections and create l2tp. You need only set up a username, password and the IPSec PSK in the IPSec additional settings

Hope it'll help you! And good luck

  • unfortunately out of date for 15.10 :( – krumpelstiltskin Jan 9 '16 at 0:18
  • Woohoo finally found a working solution on Ubuntu 14.04 ! Thanks mate ! – Tony May 8 '16 at 22:36

@AntonLugovoi - those instructions no longer work:

sudo apt-get install network-manager-l2tp-gnome
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 network-manager-l2tp-gnome : Depends: network-manager-l2tp (= but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

It looks like package openswan is no longer available.

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.