4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

今Ubuntu16.04でL2TP/IPSecなVPN接続をする

Last updated at Posted at 2018-10-11

ちょっとハマったのでメモとして.
内容としては「公式ドキュメントをくまなくよめ」が総括です.
それと,ネット上の情報は古いものが多くてビルド方法に悩んだのもありました.

やりたかったこと

Ubuntu 16.04 で L2TP / IPSec なVPN接続をしたかった(クライアント側の話).

経緯

apt で network-manager-l2tp と network-manager-l2tp-gnome をインストール.
その後,ネットワークマネージャでVPNの諸々を設定.
他のPC (Windows / Linux) やスマホでも接続した経験があるVPNサーバだったので,サーバ側に問題はないと思われる.
にもかかわらず,接続がタイムアウトしてつながらなかった.

対処

apt ではなく,ソースから network-manager-l2tp をインストールした.

ただし,公式リポジトリ のReadme.mdを読むだけだと,Ubuntu16.04ではバージョン不整合でconfigureが通らない.

公式リポジトリのWikiのBuildingに詳細なビルド方法が書かれており,こちらに書いてあるとおりにビルドしたらバージョン問題は解決.

簡単に言えば,Ubuntu 16.04 ではネットワークマネージャのバージョンが古いので,それ用のブランチをチェックアウトしてこい,という話だった.
この一言がReadmeに書いてあれば…

おまけ : 具体的な手順

sudo apt remove network-manager-l2tp*
mkdir ~/tmp
cd tmp
git clone -b nm1-2 https://github.com/nm-l2tp/network-manager-l2tp.git
cd network-manager-l2tp
./autogen.sh
./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

最初にaptでインストールしたnetwork-manager-l2tpたちをアンインストール.
その後,公式リポジトリからブランチを指定してcloneし,設定ファイルを作り,makeし,インストールする.

4
2
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
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?