Install Softether VPN on Rock PI4

What is a Rock Pi4?

A unit with components compatible to Raspberry Pi 4 , it has its own image, we use debian 10 for its PI4 series, it officially supports Android, Debian and Ubuntu.

Debian 11
apt  install cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev

Simple method:
sudo apt install softether-vpnserver

Created symlink /etc/systemd/system/multi-user.target.wants/softether-vpnserver.service β†’ /lib/systemd/system/softether-vpnserver.service

--Build from source:
Depend on your OS architecture, choose from the following that suits your OS. The image file is dated on 2023-June, please refer to Softether website for their lates release soure code url...

wget https://www.softether-download.com/files/softether/v4.41-9787-rtm-2023.03.14-tree/Linux/SoftEther_VPN_Server/64bit_-_ARM_64bit/softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-arm64-64bit.tar.gz
tar xzvf softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-arm64-64bit.tar.gz

 wget https://www.softether-download.com/files/softether/v4.41-9787-rtm-2023.03.14-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-x64-64bit.tar.gz
tar xzvf softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-x64-64bit.tar.gz

cd vpnserver
make
./.install.sh
cd ..
mv vpnserver /usr/local
 ls -l /usr/local/vpnserver/
cd /usr/local/vpnserver/
chmod 600 *
 chmod 700 vpncmd
chmod 700 vpnserver
ls -l
./vpncmd
3 >> check
exit

./vpnserver start
sudo nano /etc/init.d/vpnserver
#!/bin/bash
#SoftEther
sleep 10
# REMOVE # before sudo to turn ON
# description: SoftEther VPN Server
sudo /usr/bin/./vpnserver start
# description: SoftEther VPN Bridge
# sudo /usr/bin/vpnbridge start
# description: SoftEther VPN Client
# sudo /usr/bin/vpnclient start
exit 0

sudo chmod  +x /etc/init.d/vpnserver

sudo nano /etc/rc.local
if [ -e /etc/first_boot ]; then
    /bin/sh /etc/first_boot
    rm /etc/first_boot
    reboot
fi
/etc/init.d/vpnserver
exit 0

Scroll down and enter the following line *above* the line exit 0 (zero) at the very bottom.
/etc/init.d/vpnserver
 sudo /usr/local/vpnserver/./vpnserver start


Ubuntu 20.04
apt-get install build-essential gnupg2 gcc make
wget 
cd vpnserver
make
./.install.sh
cd ..
mv vpnserver /usr/local
cd /usr/local/vpnserver/
chmod 600 *
chmod 700 vpnserver
chmod 700 vpncmd

nano /etc/init.d/vpnserver

#!/bin/sh
### BEGIN INIT INFO
# Provides:             vpnserver
# Required-Start:
# Required-Stop:
# Default-Start:        2 3 4 5
# Default-Stop:
# Short-Description:    VPNServer
### END INIT INFO

# chkconfig: 2345 99 01
# description: VPN Server
DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/subsys/vpnserver
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
touch $LOCK
;;
stop)
$DAEMON stop
rm $LOCK
;;
restart)
$DAEMON stop
sleep 3
$DAEMON start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0


mkdir /var/lock/subsys  chmod 755 /etc/init.d/vpnserver

/etc/init.d/vpnserver start

update-rc.d vpnserver defaults


make SoftEther VPN server automatically start at boot time on Ubuntu, you can create a systemd service unit for it. You can use the following command to create the file: 

sudo nano /etc/systemd/system/vpnserver.service

[Unit]
Description=SoftEther VPN Server
After=network.target
After=dbus.service

[Service]
Type=forking
ExecStart=/usr/local/vpnserver/vpnserver start
ExecReload=/bin/kill -HUP $MAINPID


[Install]
WantedBy=multi-user.target

 systemctl daemon-reload

After creating the file, you can start the VPN server with the command: 
sudo systemctl start vpnserver. 
To set auto-start at boot time, use the command: 
sudo systemctl enable vpnserver

End...

We will be happy to hear your thoughts

Leave a reply

na.Deal
Compare items
  • Total (0)
Compare
0
Shopping cart