This article shows you how to easily connect CentOS 7 to an L2TP VPN.
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)
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
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.
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.
Click Layer 2 Tunneling Protocol (L2TP) to display the Add VPN dialog box.
Fill in each item. Then click "IPsec Settings ..." to display the "IPsec Options" dialog box.
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.
The VPN you entered has been added. Turn on the switch to the right of that item to connect to the VPN.
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.
If this doesn't work, try rebooting your system.
Recommended Posts