已经成功搞定!!
步骤:
On 16.04, you could try building and installing network-manager-l2tp which is a L2TP/IPsec VPN plugin for NetworkManager.
See the following page for the package prerequisites and strongSwan AppArmor workaround:https://github.com/nm-l2tp/network-manager-l2tp/issues/12
also as that page mentions upgrade to NetworkManager 1.2.2 or later.
Issue the following on the command-line (note: the backslash character \ is the shell line continuation character which can safely be copy and pasted) :
git checkout
https://github.com/nm-l2tp/network-manager-l2tp.gitcd network-manager-l2tp
autoreconf -fi
intltoolize
./configure \
--disable-static --prefix=/usr \
--sysconfdir=/etc --libdir=/usr/lib/x86_64-linux-gnu \
--libexecdir=/usr/lib/NetworkManager \
--localstatedir=/var \
--with-pppd-plugin-dir=/usr/lib/pppd/2.4.7
make
sudo make install
=========================
Package prerequisites for building and running
Issue the following on the command-line to install the prerequisite packages (note: the backslash character \ is the shell line continuation character and is safe to copy and paste) :
sudo apt install \
intltool \
libtool \
network-manager-dev \
libnm-util-dev \
libnm-glib-dev \
libnm-glib-vpn-dev \
libnm-gtk-dev \
libnm-dev \
libnma-dev \
ppp-dev \
libdbus-glib-1-dev \
libsecret-1-dev \
libgtk-3-dev \
libglib2.0-dev \
xl2tpd \
strongswan
NetworkManager on Ubuntu 16.04
Ubuntu 16.04 originally shipped with network-manager-1.1.93 (a developer release-candidate version of NetworkManager 1.2), which amongst other things, required the NetworkManager-l2tp --enable-absolute-paths configure switch.
On Ubuntu 16.04, it is recommended to upgrade the network-manager package to version 1.2.0 or later.
IPsec
strongSwan's charon and stroke daemons are prevented from performing correctly as child processes under NetworkManager-l2tp due to an AppArmor name space issue involving NetworkManager and the AppArmor profiles for charon and stroke.
Currently the simplest workaround is to disable two strongSwan AppArmor profiles :
sudo apparmor_parser -R /etc/apparmor.d/usr.lib.ipsec.charon
sudo apparmor_parser -R /etc/apparmor.d/usr.lib.ipsec.stroke
L2TP
In some situations a L2TP connection isn't able to be established with the system xl2tpd package, while it can be established with a locally built xl2tpd installed to /usr/local/ :
sudo apt remove xl2tpd
sudo apt install libpcap0.8-dev
wget
https://github.com/xelerance/xl2tpd/arc ... 3.6.tar.gztar xvzf xl2tpd-1.3.6.tar.gz
cd xl2tpd-1.3.6
make
sudo make install
Debugging
Issuing sudo journalctl -b on the command-line may provide hints for the cause of AppArmor, strongSwan and xl2tpd issues.
============================
基本上没什么问题,可以登录VPN了。。。