Raspberry pi 4

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
zatarra2930
Posts: 1
Joined: Tue Nov 19, 2019 8:51 am

Raspberry pi 4

Post by zatarra2930 » Tue Nov 19, 2019 9:03 am

Hello,
I recently bought an pi4, and would like to install the vpn server on the pi4. But I cant find any info regarding this, there are downloads available for raspberry, 32 bits, but my impression from reading diffrent forums is that this will not work due to the 64 bit os. Anyone tried this? I forgot to mention, I'm using Debian buster.

thank you in advance

Fredrik

ozone
Posts: 62
Joined: Thu Sep 19, 2019 7:18 pm

Re: Raspberry pi 4

Post by ozone » Thu Nov 28, 2019 8:20 am

Hi Frederik,

What os are you running on pi4?
(I ask since I understood that current Raspbian-buster (lite) is still 32b, but I haven't got a pi4 to actually test it)

Oz

qupfer
Posts: 199
Joined: Wed Jul 10, 2013 2:07 pm

Re: Raspberry pi 4

Post by qupfer » Fri Nov 29, 2019 3:00 pm

Raspbian is still a 32bit OS. A 64bt version is development. So you can use the 32bit variant...or build it from source.

git clone
cd intoTheFolder
./configure
make -C tmp -j4
sudo make -C tmp -j4 install
(and look in the error mesages for the missing dependecies)

sky59
Posts: 341
Joined: Tue Sep 11, 2018 5:58 pm

Re: Raspberry pi 4

Post by sky59 » Fri Nov 29, 2019 5:59 pm

I tried it last week on Buster Raspbian and it crashes immediatelly on "readline"

It is necessary install about 10 missing packages

ozone
Posts: 62
Joined: Thu Sep 19, 2019 7:18 pm

Re: Raspberry pi 4

Post by ozone » Sat Nov 30, 2019 2:00 pm

ok, so on pi4 with buster (32b):

works fine after installing the missing packages?

sky59
Posts: 341
Joined: Tue Sep 11, 2018 5:58 pm

Re: Raspberry pi 4

Post by sky59 » Sat Nov 30, 2019 3:37 pm

I do not know. I did not waste time with Buster.

I use openwrt, see here

https://www.vpnusers.com/viewtopic.php?f=7&t=64802

curiouser
Posts: 4
Joined: Wed Dec 04, 2019 4:05 pm

Re: Raspberry pi 4

Post by curiouser » Wed Sep 23, 2020 1:01 pm

I've been running a remote access VPN server and a LAN to LAN bridge on ARM SBCs (2x rock64s initially, now 1x rock64 = 1x rPi4). Here's a rough script that I follow for installing. This general script has worked for rock64 running Ubuntu 18.04 and rPi4 running 20.04 though my setup hasn't exceeded about 60Mb/s even though 400Mb/s is the lower of the two ISP link speeds.

NOTE: you cannot just run this script, rather you can read through it and copy paste things to ensure everything is working as you go:

Code: Select all

#!/bin/bash

# as root
sudo su

# dependencies
# apt install pthread ncurses readline openssl zlib libc gcc binutils readline-devel ncurses-devel openssl-devel libssl-dev
apt install -y openssl gcc binutils libreadline-gplv2-dev libssl-dev libncurses5-dev bridge-utils net-tools

# clone source
git clone https://github.com/SoftEtherVPN/SoftEtherVPN_Stable.git
cd SoftEtherVPN_Stable/

# build
./configure

# edit Makefile and remove `-m64` from several lines
# might be able to apply this as a patch
# -OPTIONS_COMPILE_DEBUG=-D_DEBUG -DDEBUG -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -g -fsigned-char 
# +OPTIONS_COMPILE_DEBUG=-D_DEBUG -DDEBUG -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -g -fsigned-char -m64
 
# -OPTIONS_LINK_DEBUG=-g -fsigned-char  -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
# +OPTIONS_LINK_DEBUG=-g -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
 
# -OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char 
# +OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char -m64
 
# -OPTIONS_LINK_RELEASE=-O2 -fsigned-char  -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
# +OPTIONS_LINK_RELEASE=-O2 -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz

vi Makefile 
make -j4
make install

# start script
cat << EOF > /usr/local/sbin/vpnbridge_start.sh
#!/bin/bash
# start softether VPN bridge (which creates tap, be sure to configure a new tap device named "vpn" under "local bridge")
vpnbridge start
sleep 5

# create bridge 
brctl addbr br0
brctl addif br0 tap_vpn eth0

# release IP from eth0 so it can be assigned to br0 in a moment
dhclient -r eth0
ip a del 192.168.1.101/24 dev eth0

# bring up bridge and use eth0 Mac address so that DCHP reservations continue to work
ip link set dev br0 up
ip link set br0 address aa:bb:cc:dd:ee:ff # replace me with the mac address that DHCP server expects

# request IP address from DHCP server
dhclient br0

# add route from this host to bridged network
ip route add 10.0.0.0/24 via 192.168.1.200
# comment out below for 20.04 it seems
echo 0 > /proc/sys/net/bridge/bridge-nf-call-iptables
EOF

# stop script
cat << EOF > /usr/local/sbin/vpnbridge_stop.sh
#!/bin/bash
# bring bridge down
ip link set dev br0 down
brctl delbr br0
# restore eth0
netplan apply
# stop softether VPN bridge (which destroys tap)
vpnbridge stop
EOF

# make start and stop scripts executable
chmod 700 /usr/local/sbin/vpnbridge_start.sh /usr/local/sbin/vpnbridge_stop.sh

# create service
cat << EOF > /lib/systemd/system/vpnbridge.service
[Unit]
Description=SoftEther VPN Bridge
After=network.target
[Service]
Type=forking
ExecStart=/bin/bash /usr/local/sbin/vpnbridge_start.sh
ExecStop=/bin/bash /usr/local/sbin/vpnbridge_stop.sh
[Install]
WantedBy=multi-user.target
EOF

# enable service to start vpnbridge on boot
systemctl enable vpnbridge

Post Reply