Forked from amanjuman/SoftEther VPN for Ubuntu 16.04 & 18.04
Last active
February 8, 2020 23:25
-
-
Save SwaggerRight/30e001f3e37a12a97209479ba499dc2a to your computer and use it in GitHub Desktop.
SoftEther VPN for Ubuntu 16.04 & 18.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y | |
apt-get -y install build-essential wget curl gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev zlib1g-dev | |
#check for the latest version - https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases | |
wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.32-9731-beta/softether-vpnserver-v4.32-9731-beta-2020.01.01-linux-x64-64bit.tar.gz | |
tar xzf softether-vpnserver-v4.32-9731-beta-2020.01.01-linux-x64-64bit.tar.gz && rm softether-vpnserver-v4.32-9731-beta-2020.01.01-linux-x64-64bit.tar.gz | |
cd vpnserver && sudo make | |
cd .. | |
sudo mv vpnserver /usr/local && cd /usr/local/vpnserver/ | |
sudo chmod 600 * | |
sudo chmod 700 vpnserver vpncmd | |
sudo ./vpnserver start | |
sudo ./vpncmd | |
# Enter VPN Server Management and then set Admin Passord | |
ServerPasswordSet | |
sudo cat >> /lib/systemd/system/vpnserver.service << EOF | |
[Unit] | |
Description=SoftEther VPN Server | |
After=network.target | |
[Service] | |
Type=forking | |
ExecStart=/usr/local/vpnserver/vpnserver start | |
ExecStop=/usr/local/vpnserver/vpnserver stop | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
echo net.ipv4.ip_forward = 1 | ${SUDO} tee -a /etc/sysctl.conf | |
echo net.ipv6.ip_forward = 1 | ${SUDO} tee -a /etc/sysctl.conf | |
systemctl enable vpnserver | |
systemctl start vpnserver | |
systemctl stop vpnserver | |
systemctl restart vpnserver | |
systemctl status vpnserver | |
ufw allow 500/udp | |
ufw allow 1701 | |
ufw allow 4500/udp | |
ufw allow 5555 | |
ufw allow 1194 | |
ufw allow 443 | |
# Static Route Push | |
# Format: | |
<VPC Network>/<VPC Netmask>/<VPN Gateway IP> | |
# Example: | |
10.125.0.0/255.255.0.0/10.130.30.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment