#! /bin/bash DOWNLOADURL="http://www.softether-download.com/files/softether/v4.08-9449-rtm-2014.06.08-tree/Linux/SoftEther%20VPN%20Server/32bit%20-%20ARM%20EABI/softether-vpnserver-v4.08-9449-rtm-2014.06.08-linux-arm_eabi-32bit.tar.gz" sudo apt-get update sudo apt-get dist-upgrade -y sudo apt-get install vim git-core ufw moreutils lsof rpi-update build-essential curl bridge-utils -y sudo rpi-update sudo ./iptables.sh curl $DOWNLOADURL -s | sudo tar xzvf - -C /usr/local/ pushd . cd /usr/local/vpnserver echo "1 1 1 1 " | sudo make popd sudo chmod 755 /usr/local/vpnserver sudo chmod 600 /usr/local/vpnserver/* sudo chmod 700 /usr/local/vpnserver/vpncmd sudo chmod 700 /usr/local/vpnserver/vpnserver sudo cp l2tpvpn /etc/ufw/applications.d/ sudo chmod 644 /etc/ufw/applications.d/l2tpvpn sudo ufw allow L2TPVPN sudo ufw allow ssh sudo cp vpnserver /etc/init.d/ sudo chmod 755 /etc/init.d/vpnserver sudo update-rc.d vpnserver defaults echo "Please enable UFW if you would like to be more secure (sudo ufw enable)" echo "Please check /etc/rc.local. If 'exit 0' occurs before the iptables rules, please edit so that 'exit 0' is after." echo "ATTENTION: Please restart before next step to ensure new raspberry pi firmware is loaded and vpn server starts"