SoftEtherのインストールをしていきます。
<現在のディレクトリ>
pi@raspberrypi:~ $ pwd /home/pi
SoftEtherのホームページからリンクを調べて、ダウンロード。
pi@raspberrypi:~ $ wget https://jp.softether-download.com/files/softether/v4.42-9798-rtm-2023.06.30-tree/Linux/SoftEther_VPN_Server/64bit_-_ARM_64bit/softether-vpnserver-v4.42-9798-rtm-2023.06.30-linux-arm64-64bit.tar.gz --2023-10-01 15:46:24-- https://jp.softether-download.com/files/softether/v4.42-9798-rtm-2023.06.30-tree/Linux/SoftEther_VPN_Server/64bit_-_ARM_64bit/softether-vpnserver-v4.42-9798-rtm-2023.06.30-linux-arm64-64bit.tar.gz Resolving jp.softether-download.com (jp.softether-download.com)... 130.158.75.49 Connecting to jp.softether-download.com (jp.softether-download.com)|130.158.75.49|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 8016967 (7.6M) [application/x-gzip] Saving to: ‘softether-vpnserver-v4.42-9798-rtm-2023.06.30-linux-arm64-64bit.tar.gz’ softether-vpnserver-v 100%[========================>] 7.65M 1002KB/s in 67s 2023-10-01 15:47:32 (116 KB/s) - ‘softether-vpnserver-v4.42-9798-rtm-2023.06.30-linux-arm64-64bit.tar.gz’ saved [8016967/8016967]
ダウンロードされました。
pi@raspberrypi:~ $ ls -a softether-vpnserver-v4.42-9798-rtm-2023.06.30-linux-arm64-64bit.tar.gz
解凍します。
pi@raspberrypi:~ $ tar -zxvf softether-vpnserver-v4.42-9798-rtm-2023.06.30-linux-arm64-64bit.tar.gz vpnserver/ vpnserver/Makefile vpnserver/.install.sh ・・・ vpnserver/lib/libz.a vpnserver/lib/License.txt vpnserver/hamcore.se2
ディレクトリ「vpnserver」が作られました。
pi@raspberrypi:~ $ ls -a softether-vpnserver-v4.42-9798-rtm-2023.06.30-linux-arm64-64bit.tar.gz vpnserver
ホームディレクトリから移動します。
pi@raspberrypi:~ $ sudo mv vpnserver/ /usr/local/bin/
pi@raspberrypi:~ $ cd /usr/local/bin/ pi@raspberrypi:/usr/local/bin $ ls -a . .. vpnserver pi@raspberrypi:/usr/local/bin $ cd vpnserver/
コンパイルします。
pi@raspberrypi:/usr/local/bin/vpnserver $ sudo make -------------------------------------------------------------------- SoftEther VPN Server (Ver 4.42, Build 9798, ARM 64bit) 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. ・・・(途中略)・・・ 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 '/usr/local/bin/vpnserver'
自動起動するようにします。
pi@raspberrypi:/usr/local/bin/vpnserver $ cd /etc/systemd/system/ pi@raspberrypi:/etc/systemd/system $ sudo nano softether-vpn.service
以下を記入
[Unit] Description=Softether VPN Server Service After=network.target [Service] Type=forking User=root ExecStart=/usr/local/bin/vpnserver/vpnserver start ExecStop=/usr/local/bin/vpnserver/vpnserver stop Restart=on-abort WorkingDirectory=/usr/local/bin/vpnserver/ ExecStartPre=/sbin/ip link set dev eth0 promisc on [Install] WantedBy=multi-user.target
pi@raspberrypi:/etc/systemd/system $ sudo systemctl daemon-reload
pi@raspberrypi:/etc/systemd/system $ sudo systemctl start softether-vpn.service pi@raspberrypi:/etc/systemd/system $ sudo systemctl status softether-vpn.service ● softether-vpn.service - Softether VPN Server Service Loaded: loaded (/etc/systemd/system/softether-vpn.service; disabled; vendor prese> Active: active (running) since Sun 2023-10-01 16:55:34 JST; 5s ago Process: 968 ExecStartPre=/sbin/ip link set dev eth0 promisc on (code=exited, stat> ・・・
最後にサービス自動起動を有効にしておきます。
pi@raspberrypi:/etc/systemd/system $ sudo systemctl enable softether-vpn.service Created symlink /etc/systemd/system/multi-user.target.wants/softether-vpn.service → /etc/systemd/system/softether-vpn.servic e.