Save $25 for your Cloud Computing Solution with Digital Ocean.
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
#!/bin/sh | |
# chkconfig: 2345 99 01 | |
# description: SoftEther VPN Server | |
DAEMON=/usr/local/vpnserver/vpnserver | |
LOCK=/var/lock/subsys/vpnserver | |
SERVER_IP=[SERVER_IP] | |
test -x $DAEMON || exit 0 | |
case "$1" in | |
start) | |
$DAEMON start |
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
#!/bin/bash | |
# Update system | |
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 beta | tail -1) | |
IFS='-' read -r -a RTMS <<< "${RTM}" |
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
[Unit] | |
Description=SoftEther VPN Server | |
After=network.target auditd.service | |
ConditionPathExists=!/opt/vpnserver/do_not_run | |
[Service] | |
Type=forking | |
EnvironmentFile=-/opt/vpnserver | |
ExecStart=/opt/vpnserver/vpnserver start | |
ExecStartPost=/bin/sleep 3s |
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
cd /opt/vpnserver | |
# Создаем новый tap-интерфейс, где: | |
# VPN - название созданного хаба, | |
# /DEVICE - часть названия tap-интерфейса, которое будет добсавлено к "tap_" | |
./vpncmd localhost:5555 /SERVER /CMD BridgeСreate VPN /DEVICE:vpn /TAP:yes | |
# Проверяем ново-созданный интерфейс | |
# Status должен быть "Operating" | |
./vpncmd localhost:5555 /SERVER /CMD BridgeList |
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
cd /opt/vpnserver/ | |
# Включение SecureNat | |
./vpncmd localhost:5555 /SERVER /HUB:VPN /CMD SecureNatEnable | |
# Установка mac адреса, ip адреса и маски хаба, где: | |
# /IP - ip-адрес вируального роутера хаба | |
# /MASK - его маска | |
# /MAC - MAC-адрес | |
./vpncmd localhost:5555 /SERVER /HUB:VPN /CMD SecureNatHostSet /MAC:00-11-22-33-44-55 /IP:192.168.234.1 /MASK:255.255.255.0 |
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
cd /opt/vpnserver/ | |
# Проверка сервера | |
./vpncmd /TOOLS /CMD Check | |
# Отключение Keep Alive Internet Connection | |
./vpncmd localhost:5555 /SERVER /CMD KeepDisable | |
# Выбор более устойчивого алгоримта шифрования чем установлен по умолчанию | |
./vpncmd localhost:5555 /SERVER /CMD ServerCipherSet AES256-SHA |
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
# Обновление системы и пакетов | |
apt-get update | |
apt-get upgrade -y | |
cd ~/ | |
# Установка пакетов для сборки softether | |
apt-get install build-essential libreadline-dev libssl-dev libncurses-dev zlib1g-dev git | |
# Скачивание репозитория Stable версии | |
git clone https://github.com/SoftEtherVPN/SoftEtherVPN_Stable.git |
Project moved to https://gitlab.com/kbeflo/fiberhomesuperadmin due to excessive amount of unicorns.
Discussion here on Gist is still allowed but I strongly recommend going over to Gitlab or Discord chat
OlderNewer