L2tp IPSEC PSK VPN client on (x)ubuntu 16.04

You can use

sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp  
sudo apt-get update  
sudo apt-get install network-manager-l2tp
sudo apt-get install network-manager-l2tp-gnome

To install the network manager l2tp that supports L2TP for ubuntu 16.04

Walkthrough for building from source: http://blog.z-proj.com/enabling-l2tp-over-ipsec-on-ubuntu-16-04/


On 16.04, you could try building and installing network-manager-l2tp which is a L2TP/IPsec VPN plugin for NetworkManager.

See the following page for the package prerequisites and strongSwan AppArmor workaround: https://github.com/nm-l2tp/network-manager-l2tp/wiki

also as that page mentions upgrade to NetworkManager 1.2.2 or later.

First install the following dependencies:

sudo apt install intltool libtool network-manager-dev libnm-util-dev libnm-glib-dev libnm-glib-vpn-dev libnm-gtk-dev libnm-dev libnma-dev ppp-dev libdbus-glib-1-dev libsecret-1-dev libgtk-3-dev libglib2.0-dev xl2tpd strongswan

Issue the following on the command-line (note: the backslash character \ is the shell line continuation character which can safely be copy and pasted) :

git clone https://github.com/nm-l2tp/network-manager-l2tp.git
cd network-manager-l2tp
autoreconf -fi
intltoolize

./configure \
  --disable-static --prefix=/usr \
  --sysconfdir=/etc --libdir=/usr/lib/x86_64-linux-gnu \
  --libexecdir=/usr/lib/NetworkManager \
  --localstatedir=/var \
  --with-pppd-plugin-dir=/usr/lib/pppd/2.4.7

make
sudo make install