Ubuntu16.04 configure VPN based on L2TP and ubuntu16.04l2tp

Source: Internet
Author: User
Tags sha1

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:

  • Phase1 Algorithms: 3des-sha1-modp1024

  • Phase2 Algorithms: 3des-sha1

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.