VPN Articles and News

How To Setup L2TP VPN On Linux (Ubuntu)

By
Wednesday, July 17th, 2013


The Layer 2 Tunneling Protocol is an extremely popular VPN protocol that is used to implement virtual private networks on desktops and mobile devices. The protocol offers a much higher level of encryption than the PPTP protocol plus it offers better device compatibility than the OpenVPN protocol. Most VPN providers provide L2TP implementation with pre-shared IPSec keys since it offers unmatched level of security. In this article, you will learn how to setup L2TP VPN for Ubuntu (Linux). The L2TP VPN setup is considered more complex than the PPTP VPN setup but nevertheless it can be done by anyone who is familiar with the Ubuntu and Linux interface.

How To Configure L2TP VPN on a Ubuntu machine

Step 1:  Unlike PPTP, the L2TP client is not available by default on Ubuntu so you need to install it manually on your Ubuntu machine. The exact command to install the client will depend on the version of Ubuntu you have so please refer to the official Ubuntu documentation. If you come across a message regarding installation of X. 509 certificate then click on No and continue with the setup process. (Refer to Image 1)

Step 2:  Reboot your machine. If you cannot see the L2TP Manager icon (small icon with two computers) in the Desktop Notification area then click on the “Dash home” and run L2TP-IPSec VPN Applet. This will place the L2TP Manager icon in the Desktop Notification area. (Refer to Image 2)

Step 3:  Click on the L2TP Manager icon and then on “Edit Connection” option. If prompted, input your Ubuntu profile password and click on OK button. (Refer to images Image 3a and Image 3b)

Step 4:  In the VPN Connections window, click on the Add button located at the right hand side. (Refer to Image 4)

Step 5: In the next screen, you need to provide a connection name for the new connection. Although there is no restriction whatsoever for naming VPN connections, it makes sense to use a proper connection name as it will allow you to locate and connect to the service quickly. Most security experts recommend that you include the VPN Company name along with VPN server country and protocol within your VPN connection name. So if you wish to connect to the Miami server of VPN XYZ Company through L2TP protocol, you can name the connection as “VPNXYZ-Miami-L2TP”. After clicking on the OK button, you will notice that the new connection gets added in the VPN Connections window. (Refer to Image 5a and Image 5b)

Step 6:  Next, we need to modify the connection details for the new VPN connection. Click on the VPN Connection name and then click on the Edit button. In the IPSec tab, input the VPN server IP address or hostname in the “Remote Server” input box. Next, click on the radio button next to “Use preshared key for authentication” and enter the IPSec key value provided by your VPN provider. In L2TP tab, click on the checkbox next to “Length bit”. Then, click on the PPP tab and enter your VPN account userid and password details. You may also have to check/uncheck MS-CHAP and MS-CHAPv2 checkboxes if it is explicitly mentioned by your VPN provider. Finally, you need to click on IP Settings button and select “Obtain DNS server address automatically” checkbox. Click on OK button two times to save the VPN settings. (Refer to Image 6a, Image 6b, Image 6c, Image 6d and Image 6e)

Step 7:  To test the connection, click on the L2TP Manager icon and then on the VPN connection name. Depending on your internet speed, it could take few seconds for the connection to connect to the VPN server. To stop the service, click on the L2TP Manager icon again and then on the Disconnect option. (Refer to image Image 7)


July 17, 2013
Comments

Leave a Reply

Your email address will not be published. Required fields are marked *


7 + 0 =