{"id":96,"date":"2021-01-27T11:31:32","date_gmt":"2021-01-27T09:31:32","guid":{"rendered":"https:\/\/amsd.go.ro\/wordpress\/?p=96"},"modified":"2021-09-07T11:23:14","modified_gmt":"2021-09-07T08:23:14","slug":"how-to-setup-l2tp-vpn-connection-in-linux","status":"publish","type":"post","link":"https:\/\/amsd.go.ro\/wordpress\/?p=96","title":{"rendered":"How to Setup L2TP VPN Connection in Linux"},"content":{"rendered":"<p><strong>L2TP<\/strong> (which stands for <strong>Layer 2 Tunneling Protocol<\/strong>) is a tunneling protocol designed to support <a href=\"https:\/\/www.tecmint.com\/best-vpn-services-with-lifetime-subscription\/\" rel=\"noopener noreferrer\" target=\"_blank\">virtual private networks<\/a> (VPN connections) over the internet. It is implemented in most if not all modern operating systems including Linux and VPN-capable devices.<\/p>\n<p>The <strong>L2TP<\/strong> does not provide any authentication or encryption mechanisms directly to traffic that passes through it, it is usually implemented with the IPsec authentication suite (<strong>L2TP\/IPsec<\/strong>) to provide encryption within the <strong>L2TP<\/strong> tunnel.<\/p>\n<p>In this article, we will show how to set up an <strong>L2TP\/IPSec VPN<\/strong> connection in <strong>Ubuntu<\/strong> and its derivatives and <strong>Fedora Linux<\/strong>.<\/p>\n<p>This guide assumes that the <strong>L2TP\/IPsec VPN<\/strong> server has been set up and that you have received the following VPN connection details from your organization\u2019s or company\u2019s system administrator.<\/p>\n<pre>Gateway IP address or hostname\nUsername and Password\nPre-shared Key (Secret)\n<\/pre>\n<p>To add an <strong>L2TP\/IPsec<\/strong> option to the <a href=\"https:\/\/www.tecmint.com\/manage-networking-with-networkmanager-in-rhel-centos\/\" rel=\"noopener noreferrer\" target=\"_blank\">NetworkManager<\/a>, you need to install the <strong>NetworkManager-l2tp VPN<\/strong> plugin which supports <strong>NetworkManager 1.8<\/strong> and later. It provides support for <strong>L2TP<\/strong> and <strong>L2TP\/IPsec<\/strong>.<\/p>\n<p>To install the <strong>L2TP<\/strong> module on Ubuntu and Ubuntu-based Linux distributions, use the following PPA.<\/p>\n<pre>$ sudo add-apt-repository ppa:nm-l2tp\/network-manager-l2tp\n$ sudo apt-get update\n$ sudo apt-get install network-manager-l2tp  network-manager-l2tp-gnome\n<\/pre>\n<p>On <strong>RHEL\/CentOS and Fedora<\/strong> Linux, use the following <a href=\"https:\/\/www.tecmint.com\/dnf-commands-for-fedora-rpm-package-management\/\" rel=\"noopener noreferrer\" target=\"_blank\">dnf command<\/a> to install <strong>L2TP<\/strong> module.<\/p>\n<pre># dnf install xl2tpd\n# dnf install NetworkManager-l2tp\n# dnf install NetworkManager-l2tp-gnome\nOR\n# yum install xl2tpd\n# yum install NetworkManager-l2tp\n# yum install NetworkManager-l2tp-gnome\n<\/pre>\n<p>Once the package installation is complete, click on your <strong>Network Manager<\/strong> icon, then go to <strong>Network Settings <\/strong>for standard configuration.<\/p>\n<p>Linux no longer supports the 3DES cipher, but many appliances still use it. For any &#8220;Debian like&#8221; system&nbsp; is missing phase1 and phase2 algorithm entry fields under <strong>IPSec Settings<\/strong> (this is a known bug), which are needed to setup an L2TP\/IPSec connection to use 3DES.<\/p>\n<p>Them the additional configuration consists (steps 2 and 3)::<\/p>\n<ol>\n<li>Reboot, then create a new L2TP\/IPSec VPN connection &#8211; phase1 and phase2 algorithm entry fields should now be present.<\/li>\n<li>For the Phase1 Algorithm, enter: 3des-sha1-modp1024!<\/li>\n<li>For the Phase2 Algorithm, enter: 3des-sha1!<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>L2TP (which stands for Layer 2 Tunneling Protocol) is a tunneling protocol designed to support virtual private networks (VPN connections) over the internet. It is implemented in most if not all modern operating systems including Linux and VPN-capable devices. The [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/amsd.go.ro\/wordpress\/?p=96#more-96\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">How to Setup L2TP VPN Connection in Linux<\/span><\/a><\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10,19,20],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-technology","tag-ps_32","tag-ps_60","tag-ps_19"],"_links":{"self":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=96"}],"version-history":[{"count":1,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":147,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/96\/revisions\/147"}],"wp:attachment":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}