自動起動させている場合はサービスを停止して、wgetでダウンロードして、makeしてファイルをディレクトリに配置して、設定を更新するだけ。だけ?(笑)
今回はstretchが入ったRaspberry pi 3B+です。なのでArmの32bit版。busterで64bitだとどうなるのかな??
サービスの停止はserviceかsystemctlのお好きな方で大丈夫そう。
インストールされているディレクトリを確認するためにもstatusは見ておいて損は無いでしょう。
pi@rasp3bprs:~ $ sudo systemctl status vpnserver
● vpnserver.service - SoftEther VPN Server
Loaded: loaded (/etc/systemd/system/vpnserver.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-09-14 16:58:47 JST; 19h ago
Process: 698 ExecStart=/usr/local/vpnserver/vpnserver start (code=exited, status=0/SUCCESS)
Process: 689 ExecStartPre=/sbin/ip link set dev eth0 promisc on (code=exited, status=0/SUCCESS)
Main PID: 930 (vpnserver)
Tasks: 34 (limit: 4915)
CGroup: /system.slice/vpnserver.service
┣930 /usr/local/vpnserver/vpnserver execsvc
┗931 /usr/local/vpnserver/vpnserver execsvc
9月 14 16:57:24 rasp3bprs systemd[1]: Starting SoftEther VPN Server...
9月 14 16:58:47 rasp3bprs vpnserver[698]: The SoftEther VPN Server service has been started.
9月 14 16:58:47 rasp3bprs vpnserver[698]: Let's get started by accessing to the following URL from y
9月 14 16:58:47 rasp3bprs vpnserver[698]: https://192.168.xxx.xxx:5555/
9月 14 16:58:47 rasp3bprs vpnserver[698]: or
9月 14 16:58:47 rasp3bprs vpnserver[698]: https://192.168.xxx.xxx/
9月 14 16:58:47 rasp3bprs vpnserver[698]: Note: IP address may vary. Specify your server's IP addres
9月 14 16:58:47 rasp3bprs vpnserver[698]: A TLS certificate warning will appear because the server u
9月 14 16:58:47 rasp3bprs systemd[1]: Started SoftEther VPN Server.
lines 1-20/20 (END)q
pi@rasp3bprs:~ $ sudo systemctl stop vpnserver
sudo service vpnserver statusとsudo service vpnserver stopでも同様
stopすると、ブリッジが消えてしまうのでリモートの場合は漏れなく一旦遮断されます。設定によってはここで操作不能に陥ってしまうような気もしなくもないです…。
オープンソース版の更新履歴(https://ja.softether.org/5-download/history)を見ると2020/06/24に4.34 Build 9745がbeta版からRTM版としてリリースされていました。オープンソース版のダウンロード(https://www.softether-download.com/ja.aspx)ページのコンボボックスを適切に選択後に表示される一覧から必要なURLをコピーしてターミナル画面にペースト。
pi@rasp3bprs:~ $ wget https://jp.softether-download.com/files/softether/v4.34-9745-rtm-2020.04.05-tree/Linux/SoftEther_VPN_Server/32bit_-_ARM_EABI/softether-vpnserver-v4.34-9745-rtm-2020.04.05-linux-arm_eabi-32bit.tar.gz
--2020-09-15 12:44:18-- https://jp.softether-download.com/files/softether/v4.34-9745-rtm-2020.04.05-tree/Linux/SoftEther_VPN_Server/32bit_-_ARM_EABI/softether-vpnserver-v4.34-9745-rtm-2020.04.05-linux-arm_eabi-32bit.tar.gz
jp.softether-download.com (jp.softether-download.com) をDNSに問いあわせています... 130.158.75.49
jp.softether-download.com (jp.softether-download.com)|130.158.75.49|:443 に接続しています... 接続し ました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 7134025 (6.8M) [application/x-gzip]
`softether-vpnserver-v4.34-9745-rtm-2020.04.05-linux-arm_eabi-32bit.tar.gz' に保存中
softether-vpnserver-v4.3 100%[==================================>] 6.80M 4.29MB/s in 1.6s
2020-09-15 12:44:20 (4.29 MB/s) - `softether-vpnserver-v4.34-9745-rtm-2020.04.05-linux-arm_eabi-32bit.tar.gz' へ保存完了 [7134025/7134025]
wgetが完了したら、適当なディレクトリで展開
pi@rasp3bprs:~ $ tar zxvf softether-vpnserver-v4.34-9745-rtm-2020.04.05-linux-arm_eabi-32bit.tar.gz
vpnserver/
vpnserver/Makefile
vpnserver/.install.sh
vpnserver/ReadMeFirst_License.txt
vpnserver/Authors.txt
vpnserver/ReadMeFirst_Important_Notices_ja.txt
vpnserver/ReadMeFirst_Important_Notices_en.txt
vpnserver/ReadMeFirst_Important_Notices_cn.txt
vpnserver/code/
vpnserver/code/vpnserver.a
vpnserver/code/vpncmd.a
vpnserver/lib/
vpnserver/lib/libcharset.a
vpnserver/lib/libcrypto.a
vpnserver/lib/libedit.a
vpnserver/lib/libiconv.a
vpnserver/lib/libncurses.a
vpnserver/lib/libssl.a
vpnserver/lib/libz.a
vpnserver/lib/License.txt
vpnserver/hamcore.se2
インストール時にvpnserverが存在する場合は予めrm -r ./vpnserver で削除しておいた方がいいかも。フォルダ移動してmakeを実行。
pi@rasp3bprs:~ $ cd vpnserver/
pi@rasp3bprs:~/vpnserver $ make
--------------------------------------------------------------------
SoftEther VPN Server (Ver 4.34, Build 9745, ARM EABI) for Linux Install Utility
Copyright (c) SoftEther Project at University of Tsukuba, Japan. All Rights Reserved.
--------------------------------------------------------------------
Do you want to read the License Agreement for this software ?
1. Yes
2. No
Please choose one of above number:
1
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.
Did you read and understand the License Agreement ?
(If you couldn't read above text, Please read 'ReadMeFirst_License.txt'
file with any text editor.)
1. Yes
2. No
Please choose one of above number:
1
Did you agree the License Agreement ?
1. Agree
2. Do Not Agree
Please choose one of above number:
1
make[1]: ディレクトリ '/home/pi/vpnserver' に入ります
Preparing SoftEther VPN Server...
ranlib lib/libcharset.a
ranlib lib/libcrypto.a
ranlib lib/libedit.a
ranlib lib/libiconv.a
ranlib lib/libncurses.a
ranlib lib/libssl.a
ranlib lib/libz.a
ranlib code/vpnserver.a
gcc code/vpnserver.a -fPIE -O2 -fsigned-char -pthread -lm -lrt -Wl,--no-warn-mismatch -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a -ldl -o vpnserver
ranlib code/vpncmd.a
gcc code/vpncmd.a -fPIE -O2 -fsigned-char -pthread -lm -lrt -Wl,--no-warn-mismatch -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a -ldl -o vpncmd
./vpncmd /tool /cmd:Check
vpncmd コマンド - SoftEther VPN コマンドライン管理ユーティリティ
SoftEther VPN コマンドライン管理ユーティリティ (vpncmd コマンド)
Version 4.34 Build 9745 (Japanese)
Compiled 2020/04/05 23:39:56 by buildsan at crosswin
Copyright (c) SoftEther VPN Project. All Rights Reserved.
VPN Tools を起動しました。HELP と入力すると、使用できるコマンド一覧が表示できます。
VPN Tools>Check
Check コマンド - SoftEther VPN の動作が可能かどうかチェックする
---------------------------------------------------
SoftEther VPN 動作環境チェックツール
Copyright (c) SoftEther VPN Project.
All Rights Reserved.
この動作環境チェックツールを実行したシステムがテストに合格した場合は、SoftEther VPN ソフトウェアが動作する可能性が高いです。チェックにはしばらく時間がかかる場合があります。そのままお待ちください...
'カーネル系' のチェック中...
[合格] ○
'メモリ操作系' のチェック中...
[合格] ○
'ANSI / Unicode 文字列処理系' のチェック中...
[合格] ○
'ファイルシステム' のチェック中...
[合格] ○
'スレッド処理システム' のチェック中...
[合格] ○
'ネットワークシステム' のチェック中...
[合格] ○
すべてのチェックに合格しました。このシステム上で SoftEther VPN Server / Bridge が正しく動作する可能 性が高いと思われます。
コマンドは正常に終了しました。
--------------------------------------------------------------------
The preparation of SoftEther VPN Server is completed !
*** How to switch the display language of the SoftEther VPN Server Service ***
SoftEther VPN Server supports the following languages:
- Japanese
- English
- Simplified Chinese
You can choose your prefered language of SoftEther VPN Server 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 Server Service ***
Please execute './vpnserver start' to run the SoftEther VPN Server Background Service.
And please execute './vpncmd' to run the SoftEther VPN Command-Line Utility to configure SoftEther VPN Server.
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 Server 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]: ディレクトリ '/home/pi/vpnserver' から出ます
既存の/usr/local/vpnserverをいったん退避させてmakeしたディレクトリを丸々コピー。そしてchmodを行う。
pi@rasp3bprs:~/vpnserver $ sudo mv /usr/local/vpnserver /usr/local/vpnserver_20200915
pi@rasp3bprs:~/vpnserver $ cd ..
pi@rasp3bprs:~ $ sudo rsync -av vpnserver /usr/local
sending incremental file list
vpnserver/
vpnserver/.install.sh
vpnserver/Authors.txt
vpnserver/Makefile
vpnserver/ReadMeFirst_Important_Notices_cn.txt
vpnserver/ReadMeFirst_Important_Notices_en.txt
vpnserver/ReadMeFirst_Important_Notices_ja.txt
vpnserver/ReadMeFirst_License.txt
vpnserver/hamcore.se2
vpnserver/lang.config
vpnserver/vpncmd
vpnserver/vpnserver
vpnserver/chain_certs/
vpnserver/code/
vpnserver/code/vpncmd.a
vpnserver/code/vpnserver.a
vpnserver/lib/
vpnserver/lib/License.txt
vpnserver/lib/libcharset.a
vpnserver/lib/libcrypto.a
vpnserver/lib/libedit.a
vpnserver/lib/libiconv.a
vpnserver/lib/libncurses.a
vpnserver/lib/libssl.a
vpnserver/lib/libz.a
sent 24,104,587 bytes received 443 bytes 16,070,020.00 bytes/sec
total size is 24,097,152 speedup is 1.00
pi@rasp3bprs:~ $ cd /usr/local
pi@rasp3bprs:/usr/local $ sudo chmod 700 vpnserver
pi@rasp3bprs:/usr/local $ cd vpnserver
pi@rasp3bprs:/usr/local/vpnserver $ find . -type d -exec chmod 755 {} \;
pi@rasp3bprs:/usr/local/vpnserver $ find . -type f -exec chmod 644 {} \;
pi@rasp3bprs:/usr/local/vpnserver $ chmod 700 vpncmd vpnserver
最後に設定ファイルと必要なファイルをサルベージ。
pi@rasp3bprs:/usr/local/vpnserver $ sudo cp /usr/local/vpnserver_20200915/vpn_server.config ./
pi@rasp3bprs:/usr/local/vpnserver $ sudo cp /usr/local/vpnserver_20200915/vpnserver_start ./
sudo rebootかsudo service vpnserver startなどで起動の確認。
直接vpn_server.configを編集する場合はvpnerverをstopさせないとダメっぽいのと、設定ファイル内のコメントアウトさせても起動させるとパラメータを再生成するらしく綺麗になっちゃうので注意。
参考とか
Softeatherの公式ページ https://ja.softether.org/
SoftEther VPN Serverをアップデートしてみた。 https://higherhope.net/?p=3792
VPN サーバー(SoftEther) のログ出力先を変更する http://sstea.blog.jp/raspi/vpn_server3.html
0 件のコメント:
コメントを投稿