1
0

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 1 year has passed since last update.

MLVPNをインストールする話

Posted at

MLVPNをインストールする話

序論

SoftEtherでMPTCPしても思ったようにスループットが上がらない……

必要に迫られてひかり電話を引くことになったのでNGNのVDSL回線が1本我が家に生えました。
理想論から言えば、既設回線(マンション共有無料インターネット回線)60Mbps + 新設回線(VDSL)70〜99Mbpsは出て欲しいところですが、条件が良くて瞬間的に150Mbps、平均して80Mbps程度に止まっていました。
通信を片寄せした場合には各々50〜70Mbps程度出ますので、単純にレイテンシの差が響いて遅い方の回線に律速され、通信のやり直しが行われている気もします。

実験結果=結論から述べると

既設の「MPTCP化したSoftEtherVPNでTCP接続するのが一番スループットが出ました(爆)」

以下、結局無駄となったけど今後何かに使うかと思ってMLVPNのインストールの備忘録を残しておきます

MPTCP化したSoftEtherでスループットが上がらない。ではどうするか。

Multipath UDPでスループットが上がるか試せばいいんじゃね(脳筋的発想

というわけでMultipath UDPに対応したVPNソフトを試してみます。

MLVPNをインストールする

筆者は偏屈なので先行例があるっぽいGloryTUN(自分でも試したけど上手く動かなかった)ではなくMLVPNを動かしてみたく思います。

以下、UbuntuServer22.04LTSでの話になります。

インストール

必要なライブラリをダウンロードしてインストールします(サーバー・クライアント共に)。

wget http://security.ubuntu.com/ubuntu/pool/main/libs/libsodium/libsodium18_1.0.8-5_amd64.deb
wget https://github.com/zehome/MLVPN/releases/download/2.3.5/mlvpn_2.3.5_amd64.deb
sudo apt install libev4
sudo dpkg -i libsodium18_1.0.8-5_amd64.deb
sudo dpkg -i mlvpn_2.3.5_amd64.deb

設定ファイルを書く

設定例を「/etc/mlvpn/」にコピーします。Debian/Ubuntuなら下記のコマンドで良いはずです。

sudo cp /usr/local/doc/mlvpn/examples/mlvpn.conf /etc/mlvpn/mlvpn.conf
sudo cp /usr/share/doc/mlvpn/examples/mlvpn_updown.sh /etc/mlvpn/mlvpn_updown.sh

最低限、下記の内容を記述します。

/etc/mlvpn/setting.conf(サーバー側)
mode = "server"
tuntap = "tap"
password = <YourConfigurationPassword>

[Route1]
bindhost = "<YourServerIP1>"
bindport = <YourServerIP1'sListenPort>
remotehost = "<YourClientIP1>"
remoteport = <YourClientIP1'sListenPort>

[Route2]
bindhost = "<YourServerIP2>"
bindport = <YourtServerIP2'sListenPort>
remotehost = "<YourClientIP2>"
remoteport = <YourClientIP2'sListenPort>
/etc/mlvpn/setting.conf(クライアント側)
mode = "client"
tuntap = "tap"
password = <YourConfigurationPassword>

[Route1]
bindhost = "<YourClientIP1>"
bindport = <YourClientIP1'sListenPort>
remotehost = "<YourServerIP1>"
remoteport = <YourServerIP1'sListenPort>

[Route2]
bindhost = "<YourClientIP2>"
bindport = <YourtClientIP2'sListenPort>
remotehost = "<YourServerIP2>"
remoteport = <YourServerIP2'sListenPort>

設定が完了したら、

sudo systemctl enable mlvpn.service
sudo systemctl start mlvpn.service

この時点でEthernetデバイス「mlvpn0」がシステムに追加されているはずです。

sudo ip a

接続デバイスはtapデバイスにしてあるので、既にこの時点でL2ブリッジが成立しています。
あとはこのtapデバイスをNetplanでBridgeに取り込むなり何なりと煮るなり焼くなり好きにしてください。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?