• RSS
  • subscribe
  • twitter

How to install L2TP/IPSec VPN on Ubuntu

This guide will take you through the installation of L2TP over IPsec VPN connections on your Linux workstation, be it Mint or Ubuntu. First launch your terminal, and paste the following lines therein:
sudo apt-add-repository ppa:werner-jaeger/ppa-werner-vpn
sudo apt-get update && sudo apt-get install l2tp-ipsec-vpn

l2tp-ipsec-vpn relies on Openswan and xl2tpd packages as the underlying protocol handlers. But you don’t have to install them singularly. Both packages and other dependencies are installed automatically from the repository with the above commands.
L2TP Ipsec VPN Ubuntu

Unfortunately as of today, the most current version of xl2tpd, the open source implementation of the L2TP tunneling protocol has more than a bug. These bugs affect Ubuntu 12.04 LTS, 12.10 and 13.04 versions. The first bug has to do with getting L2TP/IPSec VPN to work/connect. Given that this issue is found in version 1.2.8 of xl2tpd, a simple walk-around is to install a previous version of xl2tpd. But that takes us back to the start.

First purge/remove l2tp-ipsec-vpn if already installed with sudo apt-get purge l2tp-ipsec-vpn && sudo apt-get autoremove Then download and install xl2tpd v1.2.7. Now complete the installation with
sudo apt-get update && sudo apt-get install l2tp-ipsec-vpn

Configuring Openswan, a complete IPsec implementation for Linux kernels.
Openswan
Here, for simplicity, go with the defaults, click “No” to stop using the X.509 Certificate.
Openswan
Click “OK” on the next level of the installation. That gets you to the end of the installation. A reboot is enough to get the L2TP/Ipsec VPN Applet in the Ubuntu notification area. This GUI provides a system tray icon from which a privileged user can establish and bring down L2TP over IPsec VPN connections.

L2TP/IPSec VPN
It might happen that after successfully connecting to a VPN server using the tray icon, the tray icon continues to indicate “Not Connected”. This has to do with another bug. You can overlook this one.