A. Download VPN server souce code from Softether web site:
- Browser https://www.softether-download.com/files/softether/
- Choose the latest version
- Choose Linux
- Choose SoftEther_VPN_Server
- Choose 64bit_-_ARM_64bit
- Copy the link and download it by wget
wget https://www.softether-download.com/files/softether/v4.44-9807-rtm-2025.04.16-tree/Source_Code/softether-src-v4.44-9807-rtm.tar.gz -O vpnserver.tgz
B. Install VPN server
- Install required library
sudo apt install libreadline-dev libssl-dev - Untar the source code and make it
tar zxf vpnserver.tgz
cd vpnserver
./configure
make
make install - After make install, the vpnserver and vpncmd can be found in the follwing directories
/usr/vpnserver
/usr/vpncmd
/usr/bin
C. Configure VPN server
- Create /etc/init.d/vpnserver for vpnserver to auto start at boot time
sudo vi /etc/init.d/vpnserver
#!/bin/sh
### BEGIN INIT INFO
# Provides: vpnserver
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: VPN Server
# Description: SoftEther VPN Server
### END INIT INFO
DAEMON=/usr/bin/vpnserver
LOCK=/var/lock/subsys/vpnserver
. /lib/lsb/init-functions
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
esacexit 0 - Link vpnserver to appropriate boot level
sudo mkdir -p /var/lock/subsys
sudo chmod 755 /etc/init.d/vpnserver
sudo update-rc.d vpnserver defaults - Enable ipv4 forwarding by uncomment the following line in /etc/sysctl.conf
sudo vi /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1 - Enable vpnserver in systemd
sudo systemctl enable vpnserver - Star vpnserver to create user for vpnserver configuration
sudo /etc/init.d/vpnserver start
D. Configure VPN server
Use vpncmd to do initial configure for VPN server (step 1 to 3) and following configuration may be done by vpncmd command line or through the GUI of SoftEther VPN Server Manager for Windows.
- Check installation status
Execute vpncmd command, select 1. Management of VPN Server or VPN Bridge, press [Enter] for the first two hostname and virtual hub name question.
sudo /usr/bin/vpncmd
After VPN Server command prompt is shown, use check command to check server status.
VPN Server>check
If installation is correct, it will show that all check are "Pass". - Create password for server configuration connection
Use ServerPasswordSet command to set Set VPN Server Administrator Password.
VPN Server>PasswordSet - Select the DEFAULT hub
VPN Server>Hub DEFAULT
VPN Server/DEFAULT> - Create a user for the DEFAULT hub and set password for the created user
VPN Server/DEFAULT>UserCreate vpn
VPN Server/DEFAULT>UserPasswordSet vpn - Enable Secure NAT for the DEFAULT hub
VPN Server/DEFAULT>SecureNatEnable
VPN Server/DEFAULT>SecureNatStatusGet - Enable VPN Azure for the VPN Server
VPN Server/DEFAULT>Hub
VPN Server>VpnAzureSetEnable yes
VPN Server>VpnAzureGetStatus - Take a note for the Hostname of this VPN Server on VPN Azure Service.
E. Reboot and try it!
沒有留言:
張貼留言