Skip to content

Instantly share code, notes, and snippets.

@chanlettuce
Last active January 25, 2019 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chanlettuce/d9bedcbf42726caf090506b2fa8889e4 to your computer and use it in GitHub Desktop.
Save chanlettuce/d9bedcbf42726caf090506b2fa8889e4 to your computer and use it in GitHub Desktop.
SoftEther
# userでログイン
[user@localhost ~]$ su -
[root@localhost ~]# yum - y update
[root@localhost ~]# yum groupinstall "Development tools"
[root@localhost ~]# yum -y install wget
# SoftEtherのダウンロード
[root@localhost ~]# wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.28 -9669-beta/softether-vpnserver-v4.28-9669-beta-2018.09.11-linux-x64-64bit.tar.gz
[root@localhost ~]# tar xzvf softether-vpnserver-v4.28-9669-beta-2018.09.11-linux-x64-64bit.tar.gz
# SoftEtherビルド
[root@localhost ~]# cd vpnserver/
[root@localhost vpnserver]# make
Do you want to read the License Agreement for this software ?
1. Yes
2. No
Please choose one of above number:
1 # ←入力
Did you read and understand the License Agreement ?
(If you couldn't read above text, Please read 'ReadMeFirst_License.txt'
file with any text editor.)
1. Yes
2. No
Please choose one of above number:
1 # ←入力
Did you agree the License Agreement ?
1. Agree
2. Do Not Agree
Please choose one of above number:
1 # ←入力
[root@localhost vpnserver]# cd ..
# SoftEther設置
[root@localhost ~]# mv vpnserver /usr/local
[root@localhost ~]# cd /usr/local/vpnserver/
[root@localhost vpnserver]# chmod 600 *
[root@localhost vpnserver]# chmod 700 vpncmd
[root@localhost vpnserver]# chmod 700 vpnserver
[root@localhost vpnserver]# cat > /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
# ここでCtrl+Dを入力
[root@localhost vpnserver]# chmod 755 /etc/init.d/vpnserver
[root@localhost vpnserver]# /sbin/chkconfig --add vpnserver
# SoftEther起動
[root@localhost vpnserver]# /etc/init.d/vpnserver start
# ファイアウォール設定
[root@localhost vpnserver]# firewall-cmd --add-port=443/tcp --permanent # SoftEther本体のポート
[root@localhost vpnserver]# firewall-cmd --add-port=500/udp --permanent # L2TP/IPsecを使う場合(任意)
[root@localhost vpnserver]# firewall-cmd --add-port=4500/udp --permanent # L2TP/IPsecを使う場合(任意)
[root@localhost vpnserver]# firewall-cmd --add-port=1194/tcp --permanent # OpenVPNを使う場合(任意)
[root@localhost vpnserver]# firewall-cmd --reload # ファイアウォールのリロード
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment