Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save 85degree/ae616e48f8de4c30f46b53eae076c02b to your computer and use it in GitHub Desktop.
Save 85degree/ae616e48f8de4c30f46b53eae076c02b to your computer and use it in GitHub Desktop.
SoftEther VPN Server Setup in Raspberry Pi 3
#/bin/sh
softether_version=v4.32-9731-beta
softether_date_build=2020.01.01
softether_release=softether-vpnserver-$softether_version-$softether_date_build-linux-arm_eabi-32bit.tar.gz
softether_release_url=https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/$softether_version/$softether_release
is_user_root () { [ ${EUID:-$(id -u)} -eq 0 ]; }
if is_user_root; then
cd /tmp
wget $softether_release_url
tar xzf $softether_release && rm $softether_release
cd vpnserver && make
cd ..
mv vpnserver /usr/local && cd /usr/local/vpnserver
chmod 600 *
chmod 700 vpncmd vpnserver
wget https://gist.githubusercontent.com/apung/e584f18f694f727b4b6074b082889ddc/raw/d916a3a2247964e5438e283b2cf578565c3b1e62/softether-service -O /etc/init.d/vpnserver
chmod 755 /etc/init.d/vpnserver
update-rc.d vpnserver defaults
systemctl enable vpnserver
echo 'Done..'
echo 'Now you can run:'
echo 'sudo /usr/local/vpnserver/vpncmd'
else
echo 'Please run as root' >&2
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment