Forked from amanjuman/SoftEther VPN for Ubuntu 16.04 & 18.04
          
        
    
          Created
          June 11, 2020 05:13 
        
      - 
      
- 
        Save dammyammy/fcd3cc4f3513b8364013a7bec73497dd to your computer and use it in GitHub Desktop. 
    SoftEther VPN for Ubuntu 16.04 & 18.04
  
        
  
    
      This file contains hidden or 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 | |
| wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.34-9745-beta/softether-vpnserver-v4.34-9745-beta-2020.04.05-linux-x64-64bit.tar.gz | |
| tar xzf softether-vpnserver-v4.34-9745-beta-2020.04.05-linux-x64-64bit.tar.gz && rm softether-vpnserver-v4.34-9745-beta-2020.04.05-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 | |
| 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