レッツノートにインストールした Ubuntu に SoftEther VPN クライアントをインストールする

前書き

我が家にあるノートパソコン (レッツノート CF-LX5) に Ubuntu のデスクトップ版をインストールして使っています。 この Ubuntu に SoftEther VPN クライアント (以降 VPN クライアント) をインストールして SoftEther VPN サーバー (以降 VPN サーバー) に VPN 接続できるようにします。

インストールはコマンド操作のみで行います。

Ubuntu のバージョンは 20.04 です。

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
$

過去に書いた記事を参考にやっていきます。

[Raspberry Pi] SoftEther VPN クライアントをインストールする方法

まずは VPN クライアントをダウンロードするところから

公式ダウンロードサイト から VPN クライアントをダウンロードしてきます。以下のように選択して、最新ビルドを右クリックし、リンクのアドレスをコピーします。

  • SoftEther VPN (Freeware)
  • SoftEther VPN Client
  • Linux
  • Intel x64 / AMD64 (64bit)

コピーしたリンク先アドレスにファイルがあるかどうかを wget コマンドを使って確認 (–spider オプション) します。

$ wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.39-9772-beta/softether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz --spider
Spider mode enabled. Check if remote file exists.
--2022-06-25 16:50:24-- https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.39-9772-beta/softether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz
Resolving github.com (github.com)... 13.114.40.48
Connecting to github.com (github.com)|13.114.40.48|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/107487278/5b2fd5f3-78be-4c3d-b0e6-8d990540a605?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220625%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220625T075025Z&X-Amz-Expires=300&X-Amz-Signature=37dfd33ef84ffbbd5b2d5673eb127d92ffea68e731e11fb7809d0468eb1bf272&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=107487278&response-content-disposition=attachment%3B%20filename%3Dsoftether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz&response-content-type=application%2Foctet-stream [following]
Spider mode enabled. Check if remote file exists.
--2022-06-25 16:50:25-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/107487278/5b2fd5f3-78be-4c3d-b0e6-8d990540a605?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220625%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220625T075025Z&X-Amz-Expires=300&X-Amz-Signature=37dfd33ef84ffbbd5b2d5673eb127d92ffea68e731e11fb7809d0468eb1bf272&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=107487278&response-content-disposition=attachment%3B%20filename%3Dsoftether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.111.133, 185.199.110.133, 185.199.108.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8385772 (8.0M) [application/octet-stream]
Remote file exists.
$

Remote file exists と最後に表示されていることから、ファイルが存在していることが確認できましたので wget でダウンロードします。

$ wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.39-9772-beta/softether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz
--2022-06-25 16:53:01-- https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.39-9772-beta/softether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz
Resolving github.com (github.com)... 52.192.72.89
Connecting to github.com (github.com)|52.192.72.89|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/107487278/5b2fd5f3-78be-4c3d-b0e6-8d990540a605?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220625%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220625T075301Z&X-Amz-Expires=300&X-Amz-Signature=578367464d45828a970c9cf75c4a28cc0bd0df00c3585e0f4167ab023bdca474&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=107487278&response-content-disposition=attachment%3B%20filename%3Dsoftether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz&response-content-type=application%2Foctet-stream [following]
--2022-06-25 16:53:01-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/107487278/5b2fd5f3-78be-4c3d-b0e6-8d990540a605?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220625%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220625T075301Z&X-Amz-Expires=300&X-Amz-Signature=578367464d45828a970c9cf75c4a28cc0bd0df00c3585e0f4167ab023bdca474&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=107487278&response-content-disposition=attachment%3B%20filename%3Dsoftether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8385772 (8.0M) [application/octet-stream]
Saving to: ‘softether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz’

softether-vpnclient-v4.39-9772-beta-2022.0 100%[========================================================================================>] 8.00M 11.4MB/s in 0.7s

2022-06-25 16:53:03 (11.4 MB/s) - ‘softether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz’ saved [8385772/8385772]

$ ls -l softether*
-rw-rw-r-- 1 nobi nobi 8385772 Apr 28 10:35 softether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz
$

VPN クライアントがダウンロードできました。

VPN クライアントをインストールする

tar で解凍して sudo make でインストールしていきます。

$ tar zxvf softether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz 
vpnclient/
vpnclient/Makefile
vpnclient/.install.sh
vpnclient/ReadMeFirst_License.txt
vpnclient/Authors.txt
vpnclient/ReadMeFirst_Important_Notices_ja.txt
vpnclient/ReadMeFirst_Important_Notices_en.txt
vpnclient/ReadMeFirst_Important_Notices_cn.txt
vpnclient/code/
vpnclient/code/vpnclient.a
vpnclient/code/vpncmd.a
vpnclient/lib/
vpnclient/lib/libcharset.a
vpnclient/lib/libcrypto.a
vpnclient/lib/libedit.a
vpnclient/lib/libiconv.a
vpnclient/lib/libintelaes.a
vpnclient/lib/libncurses.a
vpnclient/lib/libssl.a
vpnclient/lib/libz.a
vpnclient/lib/License.txt
vpnclient/hamcore.se2
$ cd vpnclient/
$ sudo make
[sudo] password for nobi: 
--------------------------------------------------------------------

SoftEther VPN Client (Ver 4.39, Build 9772, Intel x64 / AMD64) for Linux Build Utility
Copyright (c) SoftEther Project at University of Tsukuba, Japan. All Rights Reserved.

--------------------------------------------------------------------

Copyright (c) all contributors on SoftEther VPN project in GitHub.
Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.

DISCLAIMER
==========

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.

USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL
RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT JUST A STATEMENT FOR WARNING AND DISCLAIMER.

READ AND UNDERSTAND THE 'src/WARNING.TXT' FILE BEFORE USING THIS SOFTWARE. SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'src/THIRD_PARTY.TXT' FILE.

--------------------------------------------------------------------

make[1]: Entering directory '/home/nobi/vpnclient'
Preparing SoftEther VPN Client...
ranlib lib/libcharset.a
ranlib lib/libcrypto.a
ranlib lib/libedit.a
ranlib lib/libiconv.a
ranlib lib/libintelaes.a
ranlib lib/libncurses.a
ranlib lib/libssl.a
ranlib lib/libz.a
ranlib code/vpnclient.a
gcc code/vpnclient.a -fPIE -O2 -fsigned-char -pthread -m64 -lm -lrt -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a lib/libintelaes.a -ldl -o vpnclient
ranlib code/vpncmd.a
gcc code/vpncmd.a -fPIE -O2 -fsigned-char -pthread -m64 -lm -lrt -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a lib/libintelaes.a -ldl -o vpncmd

--------------------------------------------------------------------
The preparation of SoftEther VPN Client is completed !

*** How to switch the display language of the SoftEther VPN Client Service ***
SoftEther VPN Client supports the following languages:
- Japanese
- English
- Simplified Chinese

You can choose your prefered language of SoftEther VPN Client at any time.
To switch the current language, open and edit the 'lang.config' file.

Note: the administrative password is not set on the VPN Server. Please set your own administrative password as soon as possible by vpncmd or the GUI manager.

*** How to start the SoftEther VPN Client Service ***

Please execute './vpnclient start' to run the SoftEther VPN Client Background Service.
And please execute './vpncmd' to run the SoftEther VPN Command-Line Utility to configure SoftEther VPN Client.

Of course, you can use the VPN Server Manager GUI Application for Windows / Mac OS X on the other Windows / Mac OS X computers in order to configure the SoftEther VPN Client remotely.

*** For Windows users ***
You can download the SoftEther VPN Server Manager for Windows
from the http://www.softether-download.com/ web site.
This manager application helps you to completely and easily manage the VPN server services running in remote hosts.

*** For Mac OS X users ***
In April 2016 we released the SoftEther VPN Server Manager for Mac OS X.
You can download it from the http://www.softether-download.com/ web site.
VPN Server Manager for Mac OS X works perfectly as same as the traditional Windows versions. It helps you to completely and easily manage the VPN server services running in remote hosts.

*** PacketiX VPN Server HTML5 Web Administration Console (NEW) ***
This VPN Server / Bridge has the built-in HTML5 Web Administration Console.

After you start the server daemon, you can open the HTML5 Web Administration Console is available at

https://127.0.0.1:5555/
or
https://ip_address_of_the_vpn_server:5555/

This HTML5 page is obviously under construction, and your HTML5 development contribution is very appreciated.

--------------------------------------------------------------------

make[1]: Leaving directory '/home/nobi/vpnclient'
$

各ファイルのパーミッションを適切に変更します。

$ sudo chmod 600 *
$ sudo chmod 700 vpncmd
$ sudo chmod 700 vpnclient
$ sudo chown root:root *
$ ls -l
total 16204
-rw------- 1 root root 82 Apr 26 18:07 Authors.txt
-rw------- 1 root root 3550 Apr 26 18:07 Makefile
-rw------- 1 root root 32256 Apr 26 18:07 ReadMeFirst_Important_Notices_cn.txt
-rw------- 1 root root 37747 Apr 26 18:07 ReadMeFirst_Important_Notices_en.txt
-rw------- 1 root root 52554 Apr 26 18:07 ReadMeFirst_Important_Notices_ja.txt
-rw------- 1 root root 3587 Apr 26 18:07 ReadMeFirst_License.txt
drw------- 2 root root 4096 Jun 25 16:58 code
-rw------- 1 root root 2009248 Apr 26 18:07 hamcore.se2
drw------- 2 root root 4096 Jun 25 16:58 lib
-rwx------ 1 root root 7214192 Jun 25 16:58 vpnclient
-rwx------ 1 root root 7214120 Jun 25 16:58 vpncmd
$

インストール作業はここまで。

VPN クライアントの簡易テストを実施する

インストール後の確認を実施する。VPN クライアントの機能としてこのテストを実施する機能 (vpncmd を起動して Check コマンドを実施する) が提供されているのでそれを使います。

$ sudo ./vpncmd
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.39 Build 9772 (English)
Compiled 2022/04/26 18:00:50 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>HELP
You can use the following 6 commands: 
About - Display the version information
Check - Check whether SoftEther VPN Operation is Possible
MakeCert - Create New X.509 Certificate and Private Key (1024 bit)
MakeCert2048 - Create New X.509 Certificate and Private Key (2048 bit)
TrafficClient - Run Network Traffic Speed Test Tool in Client Mode
TrafficServer - Run Network Traffic Speed Test Tool in Server Mode

To reference the usage for each command, input "command name ?" to view a help.
The command completed successfully.

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
$

All checks passed. と表示されればオーケーと判断します。

ファイル一式を /usr/local/vpnclient に収まるように mv コマンドで移動させ、ダウンロードしてきた VPN クライアントは不要なので削除します。

$ cd ..
$ sudo mv vpnclient/ /usr/local
$ rm softether-vpnclient-v4.39-9772-beta-2022.04.26-linux-x64-64bit.tar.gz
$

これで簡易テストも終了。作業の一段落です。

(Visited 71 times, 1 visits today)

コメントを残す

メールアドレスが公開されることはありません。

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください