Last active
February 20, 2023 08:34
-
-
Save amanjuman/08a05c634319db0cbfb44960b3416aa0 to your computer and use it in GitHub Desktop.
SoftEther VPN Server on CentOS
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
yum update -y && yum upgrade -y && yum install gcc nano wget curl -y | |
yum groupinstall "Development Tools" -y | |
wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.29-9680-rtm/softether-vpnserver-v4.29-9680-rtm-2019.02.28-linux-x64-64bit.tar.gz | |
tar xzvf softether-vpnserver-v4.29-9680-rtm-2019.02.28-linux-x64-64bit.tar.gz && rm -rf softether-vpnserver-v4.29-9680-rtm-2019.02.28-linux-x64-64bit.tar.gz | |
cd vpnserver && make | |
cd .. && sudo mv vpnserver /usr/local && cd /usr/local/vpnserver | |
sudo chmod 600 * | |
sudo chmod 700 vpncmd vpnserver | |
nano /etc/init.d/vpnserver | |
#!/bin/sh | |
# chkconfig: 2345 99 01 | |
# description: SoftEther VPN Server | |
DAEMON=/usr/local/vpnserver/vpnserver | |
LOCK=/var/lock/subsys/vpnserver | |
test -x $DAEMON || exit 0 | |
case "$1" in | |
start) | |
$DAEMON start | |
touch $LOCK | |
;; | |
stop) | |
$DAEMON stop | |
rm $LOCK | |
;; | |
restart) | |
$DAEMON stop | |
sleep 3 | |
$DAEMON start | |
;; | |
*) | |
echo "Usage: $0 {start|stop|restart}" | |
exit 1 | |
esac | |
exit 0 | |
echo net.ipv4.ip_forward = 1 | ${SUDO} tee -a /etc/sysctl.conf | |
echo net.ipv6.ip_forward = 1 | ${SUDO} tee -a /etc/sysctl.conf | |
mkdir /var/lock/subsys | |
chmod 755 /etc/init.d/vpnserver && /etc/init.d/vpnserver start && chkconfig --add vpnserver | |
systemctl enable vpnserver | |
sudo /etc/init.d/vpnserver restart | |
sudo /usr/local/vpnserver/vpncmd | |
ServerPasswordSet | |
wget -qO- https://ipecho.net/plain ; echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment