Ubuntu20.04でSoftEther VPN Server構築

Linux
スポンサーリンク
スポンサーリンク

必要ソフトのインストール

#apt install -y make gcc

SoftEther VPN Serverのダウンロード

下記にアクセスし最新バージョンのファイルURLをコピー
執筆時点の最新バージョンはVer 4.38(https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.38-9760-rtm/softether-vpnserver-v4.38-9760-rtm-2021.08.17-linux-x64-64bit.tar.gz)

先ほどコピーしたURLからファイルをwgetでダウンロードして解凍

#wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.38-9760-rtm/softether-vpnserver-v4.38-9760-rtm-2021.08.17-linux-x64-64bit.tar.gz
#tar xzvf softether-vpnserver-v4.38-9760-rtm-2021.08.17-linux-x64-64bit.tar.gz

SoftEther ダウンロード センター

SoftEther VPN Serverのインストール

解凍したフォルダに移動してmakeコマンドを実行

#cd vpnserver
#make

一つ上のディレクトリに移動してプログラムを「/usr/local」に配置

#cd ..
#mv vpnserver /usr/local
#ls -l /usr/local/vpnserver/

パーミッション設定

#cd /usr/local/vpnserver/
#chmod 600 *
#chmod 700 vpncmd
#chmod 700 vpnserver

動作確認

vpncmdを実行して、「3」を選択して「check」と入力して、「 The command completed successfully. 」と表示されればOK

#./vpncmd
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.38 Build 9760   (English)
Compiled 2021/08/17 22:32:49 by buildsan at crosswin
Copyright (c) SoftEther VPN Project. All Rights Reserved.

By using vpncmd program, the following can be achieved.

1. Management of VPN Server or VPN Bridge
2. Management of VPN Client
3. Use of VPN Tools (certificate creation and Network Traffic Speed Test Tool)

Select 1, 2 or 3: 3

VPN Tools has been launched. By inputting HELP, you can view a list of the commands that can be used.

VPN Tools>check
Check command - Check whether SoftEther VPN Operation is Possible
---------------------------------------------------
SoftEther VPN Operation Environment Check Tool

Copyright (c) SoftEther VPN Project.
All Rights Reserved.

If this operation environment check tool is run on a system and that system passes, it is most likely that SoftEther VPN software can operate on that system. This check may take a while. Please wait...

Checking 'Kernel System'...
              Pass
Checking 'Memory Operation System'...
              Pass
Checking 'ANSI / Unicode string processing system'...
              Pass
Checking 'File system'...
              Pass
Checking 'Thread processing system'...
              Pass
Checking 'Network system'...
              Pass

All checks passed. It is most likely that SoftEther VPN Server / Bridge can operate normally on this system.

The command completed successfully.

VPN Tools>exit
#

systemdにサービス登録

nano /etc/systemd/system/vpnserver.service
---下記を入力---
[Unit]
Description=SoftEther VPN Server
After=network.target network-online.target

[Service]
ExecStart=/usr/local/vpnserver/vpnserver start
ExecStop=/usr/local/vpnserver/vpnserver stop
Type=forking
RestartSec=3s

[Install]
WantedBy=multi-user.target
---以上---

SoftEther VPN Serverを起動

#systemctl enable vpnserver
#systemctl start vpnserver
#systemctl status vpnserver

動作確認

先ほどSoftEtherVPN Serverをダウンロードしたページから「SoftEther VPN サーバ管理マネージャ」をダウンロードしてきてインストールします。

SoftEther ダウンロード センター

SoftEther VPN Serverの情報をパスワードなしで登録して、接続して初回パスワードが聞かれたらインストールが完了です。

コメント