-
-
Save mohamedsharaf/173418b5893b89c6a66bd9f56107cfa2 to your computer and use it in GitHub Desktop.
Revisions
-
bouroo revised this gist
Jan 24, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -84,6 +84,7 @@ EOF # Act as router echo "net.ipv4.ip_forward = 1" | ${SUDO} tee -a /etc/sysctl.conf # Tune Kernel echo "net.ipv4.ip_local_port_range = 1024 65535" | ${SUDO} tee -a /etc/sysctl.conf echo "net.ipv4.tcp_congestion_control = bbr" | ${SUDO} tee -a /etc/sysctl.conf echo "net.core.default_qdisc = fq_codel" | ${SUDO} tee -a /etc/sysctl.conf -
bouroo revised this gist
Jan 24, 2019 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -83,7 +83,10 @@ WantedBy=multi-user.target EOF # Act as router echo "net.ipv4.ip_forward = 1" | ${SUDO} tee -a /etc/sysctl.conf echo "net.ipv4.ip_local_port_range = 1024 65535" | ${SUDO} tee -a /etc/sysctl.conf echo "net.ipv4.tcp_congestion_control = bbr" | ${SUDO} tee -a /etc/sysctl.conf echo "net.core.default_qdisc = fq_codel" | ${SUDO} tee -a /etc/sysctl.conf ${SUDO} sysctl -p # Reload service -
bouroo revised this gist
Jan 3, 2019 . 1 changed file with 14 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,19 @@ # Register digitalocean with free credit https://m.do.co/c/4879bb02d178 # Create vps with 5usd price # Tested on Ubuntu 18.10, Debian 9.6 # How to... # 1. Save this file as softether-installer.sh # 2. chmod +x softether-installer.sh # 3. Run bash file # > ./softether-installer.sh # Or just # > bash softether-installer.sh # 4. Init config vpnserver # > cd /usr/local/vpnserver # > ./vpncmd # Enter into local server/hub config # > ServerPasswordSet {yourPassword} # Then use SoftEther VPN Server Manager to mange your server if [ "$(whoami)" != "root" ]; then SUDO=sudo @@ -29,7 +42,7 @@ ${SUDO} rm /tmp/softether-vpnserver.tar.gz # Move to source directory cd /usr/local/vpnserver # Workaround for 18.04+ ${SUDO} sed -i 's|OPTIONS=-O2|OPTIONS=-no-pie -O2|' Makefile # Build softether @@ -80,10 +93,4 @@ ${SUDO} systemctl enable vpnserver # Start service ${SUDO} systemctl restart vpnserver exit 0 -
bouroo revised this gist
Jan 3, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ #!/usr/local/env bash # Register digitalocean with free credit https://m.do.co/c/4879bb02d178 # Create vps with 5usd price # Tested on Ubuntu 18.10, Debian 9.6 if [ "$(whoami)" != "root" ]; then SUDO=sudo -
bouroo revised this gist
Jan 3, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,7 @@ cd /usr/local/vpnserver ${SUDO} sed -i 's|OPTIONS=-O2|OPTIONS=-no-pie -O2|' Makefile # Build softether ${SUDO} make i_read_and_agree_the_license_agreement # Change file permission ${SUDO} chmod 0600 * && ${SUDO} chmod +x vpnserver && ${SUDO} chmod +x vpncmd @@ -82,7 +82,7 @@ ${SUDO} systemctl restart vpnserver # Init config vpnserver # > cd /usr/local/vpnserver # > ./vpncmd # > ServerPasswordSet {yourPassword} # Then use SoftEther VPN Server Manager to mange your server exit 0 -
bouroo revised this gist
Oct 3, 2018 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -28,6 +28,9 @@ ${SUDO} rm /tmp/softether-vpnserver.tar.gz # Move to source directory cd /usr/local/vpnserver # Workaround for 18.04 ${SUDO} sed -i 's|OPTIONS=-O2|OPTIONS=-no-pie -O2|' Makefile # Build softether make i_read_and_agree_the_license_agreement -
bouroo revised this gist
Oct 3, 2018 . 1 changed file with 17 additions and 12 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,16 @@ #!/usr/local/env bash # Register digitalocean with free credit https://m.do.co/c/4879bb02d178 # Create vps with 5usd price if [ "$(whoami)" != "root" ]; then SUDO=sudo fi # Update system ${SUDO} apt-get update && ${SUDO} apt-get -y upgrade # Get build tools ${SUDO} apt-get -y install build-essential wget curl gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev zlib1g-dev # Define softether version RTM=$(curl http://www.softether-download.com/files/softether/ | grep -o 'v[^"]*e' | grep rtm | tail -1) @@ -15,10 +20,10 @@ IFS='-' read -ra RTMS <<< "${RTM}" wget "http://www.softether-download.com/files/softether/${RTMS[0]}-${RTMS[1]}-${RTMS[2]}-${RTMS[3]}-${RTMS[4]}/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-${RTMS[0]}-${RTMS[1]}-${RTMS[2]}-${RTMS[3]}-linux-x64-64bit.tar.gz" -O /tmp/softether-vpnserver.tar.gz # Extract softether source ${SUDO} tar -xzvf /tmp/softether-vpnserver.tar.gz -C /usr/local/ # Remove unused file ${SUDO} rm /tmp/softether-vpnserver.tar.gz # Move to source directory cd /usr/local/vpnserver @@ -27,11 +32,11 @@ cd /usr/local/vpnserver make i_read_and_agree_the_license_agreement # Change file permission ${SUDO} chmod 0600 * && ${SUDO} chmod +x vpnserver && ${SUDO} chmod +x vpncmd # Link binary files ${SUDO} ln -s /usr/local/vpnserver/vpnserver /usr/local/bin/vpnserver ${SUDO} ln -s /usr/local/vpnserver/vpncmd /usr/local/bin/vpncmd # Add systemd service cat <<EOF >/lib/systemd/system/vpnserver.service @@ -61,15 +66,15 @@ WantedBy=multi-user.target EOF # Act as router echo net.ipv4.ip_forward = 1 | ${SUDO} tee -a /etc/sysctl.conf ${SUDO} sysctl -p # Reload service ${SUDO} systemctl daemon-reload # Enable service ${SUDO} systemctl enable vpnserver # Start service ${SUDO} systemctl restart vpnserver # Init config vpnserver # > cd /usr/local/vpnserver -
bouroo revised this gist
Aug 6, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ apt-get -y install build-essential wget curl gcc make wget tzdata git libreadlin # Define softether version RTM=$(curl http://www.softether-download.com/files/softether/ | grep -o 'v[^"]*e' | grep rtm | tail -1) IFS='-' read -ra RTMS <<< "${RTM}" # Get softether source wget "http://www.softether-download.com/files/softether/${RTMS[0]}-${RTMS[1]}-${RTMS[2]}-${RTMS[3]}-${RTMS[4]}/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-${RTMS[0]}-${RTMS[1]}-${RTMS[2]}-${RTMS[3]}-linux-x64-64bit.tar.gz" -O /tmp/softether-vpnserver.tar.gz -
bouroo revised this gist
Apr 18, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ #!/usr/local/env bash # Register digitalocean with free credit https://m.do.co/c/4879bb02d178 # Create vps with 5usd price # Update system apt-get update && apt-get -y upgrade -
bouroo revised this gist
Mar 27, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -44,6 +44,7 @@ ExecStart=/usr/local/vpnserver/vpnserver start ExecStop=/usr/local/vpnserver/vpnserver stop KillMode=process Restart=on-failure WorkingDirectory=/usr/local/vpnserver # Hardening PrivateTmp=yes -
bouroo revised this gist
Mar 27, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -69,6 +69,7 @@ systemctl enable vpnserver systemctl restart vpnserver # Init config vpnserver # > cd /usr/local/vpnserver # > ./vpncmd # > ServerPasswordSet yourPassword # Then use SoftEther VPN Server Manager to mange your server -
bouroo revised this gist
Mar 27, 2018 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -68,7 +68,9 @@ systemctl enable vpnserver # Start service systemctl restart vpnserver # Init config vpnserver # > ./vpncmd # > ServerPasswordSet yourPassword # Then use SoftEther VPN Server Manager to mange your server exit 0 -
bouroo revised this gist
Mar 21, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ apt-get update && apt-get -y upgrade # Get build tools apt-get -y install build-essential wget curl gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev zlib1g-dev # Define softether version RTM=$(curl http://www.softether-download.com/files/softether/ | grep -o 'v[^"]*e' | grep rtm | tail -1) -
bouroo revised this gist
Mar 21, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ apt-get update && apt-get -y upgrade # Get build tools apt-get -y install build-essential wget curl gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev # Define softether version RTM=$(curl http://www.softether-download.com/files/softether/ | grep -o 'v[^"]*e' | grep rtm | tail -1) -
bouroo revised this gist
Dec 15, 2017 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -36,11 +36,22 @@ cat <<EOF >/lib/systemd/system/vpnserver.service [Unit] Description=SoftEther VPN Server After=network.target ConditionPathExists=!/usr/local/vpnserver/do_not_run [Service] Type=forking ExecStart=/usr/local/vpnserver/vpnserver start ExecStop=/usr/local/vpnserver/vpnserver stop KillMode=process Restart=on-failure # Hardening PrivateTmp=yes ProtectHome=yes ProtectSystem=full ReadOnlyDirectories=/ ReadWriteDirectories=-/usr/local/vpnserver CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_ADMIN CAP_SETUID [Install] WantedBy=multi-user.target -
bouroo revised this gist
Oct 16, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -57,7 +57,7 @@ systemctl enable vpnserver # Start service systemctl restart vpnserver # vpncmd # ServerPasswordSet yourPassword exit 0 -
bouroo revised this gist
Oct 16, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -57,4 +57,7 @@ systemctl enable vpnserver # Start service systemctl restart vpnserver # vpmcmd # ServerPasswordSet yourPassword exit 0 -
bouroo revised this gist
Oct 16, 2017 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -47,7 +47,9 @@ WantedBy=multi-user.target EOF # Act as router echo net.ipv4.ip_forward = 1 | sudo tee -a /etc/sysctl.conf sysctl -p # Reload service systemctl daemon-reload # Enable service -
bouroo revised this gist
Oct 16, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -46,6 +46,8 @@ ExecStop=/usr/local/vpnserver/vpnserver stop WantedBy=multi-user.target EOF # Act as router echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf # Reload service systemctl daemon-reload # Enable service -
bouroo revised this gist
Sep 7, 2017 . 1 changed file with 8 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,16 @@ #!/usr/local/env bash # Update system apt-get update && apt-get -y upgrade # Get build tools apt-get -y install build-essential wget curl # Define softether version RTM=$(curl http://www.softether-download.com/files/softether/ | grep -o 'v[^"]*e' | grep rtm | tail -1) IFS='-' read -r -a RTMS <<< "${RTM}" # Get softether source wget "http://www.softether-download.com/files/softether/${RTMS[0]}-${RTMS[1]}-${RTMS[2]}-${RTMS[3]}-${RTMS[4]}/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-${RTMS[0]}-${RTMS[1]}-${RTMS[2]}-${RTMS[3]}-linux-x64-64bit.tar.gz" -O /tmp/softether-vpnserver.tar.gz # Extract softether source tar -xzvf /tmp/softether-vpnserver.tar.gz -C /usr/local/ @@ -24,7 +25,7 @@ cd /usr/local/vpnserver make i_read_and_agree_the_license_agreement # Change file permission chmod 0600 * && chmod +x vpnserver && chmod +x vpncmd # Link binary files ln -s /usr/local/vpnserver/vpnserver /usr/local/bin/vpnserver -
bouroo created this gist
Sep 7, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,55 @@ #!/usr/local/env bash # Define softether version VERSION='v4.20-9608-rtm-2016.04.17' # Update system apt-get update && apt-get -y full-upgrade # Get build tools apt-get -y install build-essential iptables # Get softether source wget http://www.softether-download.com/files/softether/${VERSION}-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-${VERSION}-linux-x64-64bit.tar.gz -O /tmp/softether-vpnserver.tar.gz # Extract softether source tar -xzvf /tmp/softether-vpnserver.tar.gz -C /usr/local/ # Remove unused file rm /tmp/softether-vpnserver.tar.gz # Move to source directory cd /usr/local/vpnserver # Build softether make i_read_and_agree_the_license_agreement # Change file permission chmod 0600 * && chmod 0700 vpnserver && chmod 0700 vpncmd # Link binary files ln -s /usr/local/vpnserver/vpnserver /usr/local/bin/vpnserver ln -s /usr/local/vpnserver/vpncmd /usr/local/bin/vpncmd # Add systemd service cat <<EOF >/lib/systemd/system/vpnserver.service [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 # Reload service systemctl daemon-reload # Enable service systemctl enable vpnserver # Start service systemctl restart vpnserver exit 0