gordon0193
Posts: 11
Joined: Thu Jan 16, 2020 4:11 pm

How To: Install SoftEther on Raspberry Pi 4

Fri Jan 17, 2020 7:47 pm

UPDATE - This message has two parts this message which is a step by step and a reply which uses a script.

I couldn't find a complete step-by-step go to doc on how to do this so I'm posting this so others may leverage what I've done. I'm just a hobbyist so others may provide other views and my process may not be the best.

I was able to use the SoftEther VPN management tools and connect with a client without any issues. I did not test every feature. You'll also notice I did not enable the Bridge and Client service. These can be enabled by removing the "#" (as noted in the file softether).

This process was done on a clean updated Buster OS

***

Open a Terminal window and run each of the following lines

Get additional required library modules

Code: Select all

sudo apt -y install cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev

Get the current stable SoftEther bits

Code: Select all

git clone https://github.com/SoftEtherVPN/SoftEtherVPN_Stable.git

Change to the source code directory

Code: Select all

cd SoftEtherVPN_Stable

Run the configure

Code: Select all

./configure

Make the program from the bits

Code: Select all

make -j4

Now we'll install the programs

Code: Select all

sudo make -j4 install
One can now run the SoftEther programs (located in /usr/bin)
Execute 'sudo vpnserver start' to run the SoftEther VPN Server background service.
Execute 'sudo vpnbridge start' to run the SoftEther VPN Bridge background service.
Execute 'sudo vpnclient start' to run the SoftEther VPN Client background service.

To auto start the programs on boot

Open a terminal window if not already open

Make a start up script using the Nano program which will be called softether

Code: Select all

sudo nano /etc/init.d/softether

This will open the Nano text editor for a file called softether. Enter the following text.

Code: Select all

#!/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
To save the file and exit
^O - To save
[Press Enter/Return]
^X - To Exit


Need to change the change permissions of softether script

Code: Select all

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

Edit rc.local with the Nano text editor to have a softether to run when the Pi boots

Code: Select all

sudo nano /etc/rc.local

Scroll down and enter the following line *above* the line exit 0 (zero) at the very bottom.

Code: Select all

/etc/init.d/softether
To save the file and exit
^O - To save
[Press Enter/Return]
^X - To Exit


Close terminal window and reboot



Configure as you would normally via the Windows GUI tool or the command line tool.
Last edited by gordon0193 on Sat Feb 01, 2020 4:20 pm, edited 1 time in total.

gordon0193
Posts: 11
Joined: Thu Jan 16, 2020 4:11 pm

Re: How To: Install SoftEther on Raspberry Pi 4

Sat Feb 01, 2020 4:04 pm

Here is an install version that is script based (less cust and paste). It's a real simple script and assums you want to set have the program to start on boot up.

Pro Linux users skip down to the script...for all others...

Right click on the desktop and select 'New File'

For this walk through I'm calling my file 'se-install.sh' - you can call it whatever you want however.

Image
[

Right click on the file 'se-install.sh' which is on your desktop and select Open

This will open the file in an editor

Cut and past the complete script into the editor [this first line being #!/bin/bash and the last being exit 0]

Code: Select all

#!/bin/bash
cd
# Get some additional libraries
sudo apt -y install cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev
# Get the current stable version of SoftEther from GitHub
git clone https://github.com/SoftEtherVPN/SoftEtherVPN_Stable.git
# Let's build and install SoftEther
cd SoftEtherVPN_Stable
./configure
make -j4
sudo make -j4 install
# Create a script for the start on boot
# Create the script called - softether
sudo touch /etc/init.d/softether
# Add the commands to the file 
echo "*** Adding commands to script ***" 
echo "#!/bin/bash"							| sudo tee 	  /etc/init.d/softether	
echo "# SoftEther"							| sudo tee -a /etc/init.d/softether
echo "sleep 10"								| sudo tee -a /etc/init.d/softether
echo "# REMOVE # before sudo to turn ON"	| sudo tee -a /etc/init.d/softether
echo "# description: SoftEther VPN Server"	| sudo tee -a /etc/init.d/softether
echo "sudo /usr/bin/vpnserver start"		| sudo tee -a /etc/init.d/softether
echo "# description: SoftEther VPN Bridge"	| sudo tee -a /etc/init.d/softether
echo "# sudo /usr/bin/vpnbridge start"		| sudo tee -a /etc/init.d/softether
echo "# description: SoftEther VPN Client"	| sudo tee -a /etc/init.d/softether
echo "# sudo /usr/bin/vpnclient start"		| sudo tee -a /etc/init.d/softether
echo "exit 0"								| sudo tee -a /etc/init.d/softether
# Need to change the change permissions of softether script
sudo chmod +x /etc/init.d/softether
# Edit rc.local to have a softether to run when the Pi boots
# Scrolling down and enter the following line *above* the line exit 0 (zero)
# Lets check to see if line exist and if not lets add it
grep -q "/etc/init.d/softether" /etc/rc.local
if [ $? -eq 0 ]; then 
	echo "No need to modify rc.local"
else
	sudo sed -i "\$i /etc/init.d/softether" /etc/rc.local
fi
clear
echo "********************************************************"
echo "  "
echo " You may configure SoftEther via the Windows GUI tool "
echo " or the command line tool SoftEther provides "
echo " "
echo -e  " Please \033[0;31m REBOOT \033[0m the Pi "
echo "  "
echo "********************************************************"
echo " "
read -n 1 -s -r -p " * * * Press any key to continue * * *"
exit 0
Save the file.

Quit the editor.

Change the ability for the file to run as an executable.

Right click on the file 'se-install.sh' and select Properties


Image

Select Permissions

Change Execute to Anyone

Click on OK


Right click on the file 'se-install.sh' which is on your desktop and select Open

Image

This time it will want to execute the script, select 'Execute in Terminal'.

When the script is done press any key and reboot your Pi.
Attachments
open.png
open.png (13.09 KiB) Viewed 13339 times
File-Prop.png
File-Prop.png (24.8 KiB) Viewed 13339 times
CreateFile.png
CreateFile.png (8.64 KiB) Viewed 13339 times

Return to “Networking and servers”