Softether server的安装配置(ubuntu、debian)[转]
很多时候我们需要从外面访问公司或者家里的文件或者网络,这个时候就可以通过搭建vpn来实现,这里我推荐用softether来实现。
softether同时支持sslvpn,openvpn,ms-sstp,l2tp四种协议,可以实现对用户的单账号登录、限速、访问内容限制等功能。其中softether自己的sslvpn协议可以同时32链路连接,速度超过openvpn。
本文softether服务端配置基于Ubuntu12.04(我在22.04用这个方法同样部署成功)
1.配置softether安装环境:
apt-get install build-essential
2.下载softether服务器端程序:
wget http://www.softether-download.com/files/softether/v4.19-9599-beta-2015.10.19-tree/Linux/SoftEther_VPN_Server/32bit_-_Intel_x86/softether-vpnserver-v4.19-9599-beta-2015.10.19-linux-x86-32bit.tar.gz
(以上不是最新的,示例用,最新的到官网下载:http://www.softether-download.com/cn.aspx?product=softether)
3.解压程序:
tar zxvf softether-vpnserver-v4.19-9599-beta-2015.10.19-linux-x86-32bit.tar.gz
进入softether目录编译:
cd vpnserver/ make //安装过程用一路选择Y(yes)
然后执行:
cd .. mv vpnserver /usr/local cd /usr/local/vpnserver/ chmod 600 * chmod 700 vpncmd chmod 700 vpnserver
4.配置启动项:
新建启动项:
vim /etc/init.d/vpnserver
编辑内容:
#!/bin/sh ### BEGIN INIT INFO # Provides: vpnserver # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start daemon at boot time # Description: Enable Softether by daemon. ### END INIT INFO 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
5.其他配置:
chmod 755 /etc/init.d/vpnserver mkdir /var/lock/subsys update-rc.d vpnserver defaults /etc/init.d/vpnserver start
#systemctl enable vpnserver
其他步骤请参考原文:https://maytalkhao.com/archives/394
-----