LoginSignup
19
22

More than 5 years have passed since last update.

UbuntuからL2TP/IPsecにVPN接続する

Last updated at Posted at 2017-05-08

UbuntuからL2TPなサーバーにVPN接続しようとしたらめちゃくちゃハマってしまったのでここで覚書

環境

  • サーバー
    • Windows Server 2012(L2TP/IPsec)
  • クライアント
    • Ubuntu 16.04

手順

$ sudo apt install xl2tpd strongswan git libgtk-3-dev libnma-dev libsecret-1-dev libnm-gtk-dev libnm-util-dev network-manager-dev libnm-glib-vpn-dev dh-autoreconf libglib2.0-dev ppp-dev intltool
$ git clone https://github.com/nm-l2tp/network-manager-l2tp.git
$ cd network-manager-l2tp
$ sudo ./autogen.sh
$ sudo ./configure --prefix=/usr \
--sysconfdir=/etc --localstatedir=/var \
--libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu \
--with-pppd-plugin-dir=/usr/lib/pppd/2.4.7 --enable-absolute-paths
$ sudo make
$ sudo make install

$ sudo service xl2tpd stop
$ sudo update-rc.d xl2tpd disable
$ sudo service network-manager restart

後はnetwork-managerからVPNの設定をすればOK
注意点としては、
- IP Settings=>Enable IPsec tunnel to L2TP hostPPP Settings=>Use Point-to-Point encryption (MPPE)にチェックすること
- /etc/network/interfaceでIPの固定はしないこと(するとnetwork-managerで管理ができなくなる)

参考

19
22
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
22