Ubuntu has stopped shipping L2TP over IPSec support since Precise. A workaround for this exists using network-manager-l2tp.
In this tutorial we will show you how to set up L2TP/IPSec VPN on Ubuntu but first let’s see what are our requirements and recommendations.
In order to set up the L2TP/IPSec VPN you will need:
- A RayaVPN account. If you don’t have one you can try our services now.
- Your VPN username, password and VPN server address. You can find them in your account on our website, by going to your package.
If you want to set up L2TP/IPSec VPN manually, go step-by-step through following instructions:
L2TP/IPSec VPN Setup instructions
- Open Terminal (1).
- Type following commands one by one:sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp
sudo apt-get update
sudo apt-get install network-manager-l2tp-gnome
- Click Network Manager (2) > “VPN Connections” (3) > “Configure VPN” (4).
- In the “Network Connections” window, select the “VPN” tab and press the “Add” button (5).In the “Choose a Connection Type” window select “Layer 2 Tunneling Protocol (L2TP)” (6) and press the “Create…” button (7).
- Select “Ipsec settings…” (8).
- Check the “Enable IPsec tunnel to L2TP host” checkbox (9).Enter the IP address of RayaVPN server you want to connect to in the “Gateway ID” field (10). You can find all the available servers in the package details in your account. Enter “123456” in the “Pre-shared” key field (11). Press “OK” (12).
- Set a name for your VPN connection in the “Connection name” field (13).Fill in the “User name” and “Password” fields (14) your VPN username and password. You can find them in your account on our website, by going to your package. Make sure you use your VPN username and password and NOT the website account credentials. Click on “Save” (15).
- The L2TP over IPsec VPN connection on Ubuntu is set up. Connect to VPN by choosing the created VPN connection from the “Network Manager”.