Connect CentOS 7 to L2TP VPN

This article shows you how to easily connect CentOS 7 to an L2TP VPN.

Introduction

There are an increasing number of cases of teleworking / working from home and connecting to a VPN at work. Setting libreswan and xl2tpd on CentOS 7 is quite difficult.

However, if you install the L2TP plug-in in NetworkManager, you can easily set up and connect the L2TP client from the GUI menu.

(I tried it on CentOS 7.8)

Install the NetworkManager plugin

First, install the L2TP plugin on NetworkManager with yum. Then restart NetworkManager.

$ sudo yum -y install NetworkManager-l2tp NetworkManager-l2tp-gnome
$ sudo systemctl restart NetworkManager

L2TP client connection settings

From here, it is a GUI operation.

From the setting menu, set the L2TP VPN to connect to.

Select [Applications] → [System Tools] → [Settings] to display the settings window. Select [Network] from the menu on the left of the displayed window.

l2tp-setting-1.png

Click the "+" mark on the right side of the VPN to display the "Add VPN" dialog box. You can see that “Layer 2 Tunneling Protocol (L2TP)” has been added.

l2tp-setting-2.png

Click Layer 2 Tunneling Protocol (L2TP) to display the Add VPN dialog box.

l2tp-setting-3.png

Fill in each item. Then click "IPsec Settings ..." to display the "IPsec Options" dialog box.

l2tp-setting-4.png

Check "Enable IPsec tunnel to L2TP host", enter the pre-shared key in "Pre-shared key", and press "OK".

This completes the connection destination settings.

Connect to VPN

The VPN you entered has been added. Turn on the switch to the right of that item to connect to the VPN.

l2tp-setting-5.png

Easier operation

You can also easily access the VPN connection menu from the pull-down menu in the bar at the top right of the screen. You don't have to open the menu each time, so you can connect with a few operations.

l2tp-setting-9.png

If this doesn't work, try rebooting your system.

Recommended Posts

Connect CentOS 7 to L2TP VPN
[Java] Connect to MySQL
Build softether VPN with Centos7.
Introducing AWS CLI to CentOS 7
Connect from Java to PostgreSQL
Connect to DB with Java
Connect to MySQL 8 with Java
Connect to oracle with eclipse!
Introducing JITSI MEET to CentOS 8
[Android] Connect to MySQL (unfinished)
Steps to install samba on CentOS 8 and connect from Windows 10 Explorer
Operation to connect multiple Streams @Java
Dynamically switch the database to connect to
How to deploy Laravel on CentOS 7
Upgrade from MYSQL5.7 to 8.0 on CentOS 6.7
How to connect Heroku and Sequel
Connect to Rails server with iPhone
Steps to install devtoolset-6 on CentOS 7