Ubuntu16.04 configure VPN based on L2TP and ubuntu16.04l2tp
The basic idea is to install this tool: network-manager-l2tp
Ubuntu has stopped shipping L2TP over IPSec support for Ubuntu since Precise. A workaround for this exists using network-manager-l2tp
Installation Method: Ctrl + Alt + T enable Terminal:
sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp sudo apt-get update sudo apt-get install network-manager-l2tp
After the installation is complete, restart the computer for configuration, such:
Click: IPsec settings:
In addition, you can also compile it by yourself: see Enabling L2TP over IPSec on Ubuntu 16.04. However, it should be noted that the compilation is successful only in the Python2.7 environment. Of course, an error may be reported during the compilation process, indicating that some tools are missing. After installing the corresponding "tool" according to the error prompt, then re-compile.
We recommend a Python version management tool Pyenv. For a usage example of pyenv, see pyenv for Python multi-version coexistence.
After the VPN connection is configured, the system prompts: the VPN connection is disconnected and the VPN service is stopped. Tail-f/var/log/syslog found the following error:
g_dbus_method_invocation_take_error: assertion 'error != NULL' failed
Solution:
$ sudo systemctl stop strongswan $ sudo ike-scan vpn.xxx.cn
Vpn.xxx.cn is your gateway address. View the output result, find the values of the Enc, Hash, and Group fields, and fill in the displayed values:
SA=(Enc=3DES Hash=SHA1 Auth=PSK Group=2:modp1024 LifeType=Seconds LifeDuration(4)=0x00007080)
Connect to the vpn again and enter the dynamic password.
References:
Enabling L2TP over IPSec on Ubuntu 16.04
VPN L2TP/IPSec client on Ubuntu 16.04 VPN service failed to start
Original article: http://www.cnblogs.com/hapjin/p/7732014.html