提交 f9674748 编写于 作者: T Toyo 提交者: GitHub

# v1.0.2 修复 重启服务器后,ipv4防火墙转发未打开的问题。

上级 de6acf18
......@@ -5,11 +5,11 @@ export PATH
#=================================================
# System Required: Debian/Ubuntu
# Description: ocserv AnyConnect
# Version: 1.0.1
# Version: 1.0.2
# Author: Toyo
# Blog: https://doub.io/vpnzy-7/
#=================================================
sh_ver="1.0.1"
sh_ver="1.0.2"
file="/usr/local/sbin/ocserv"
conf_file="/etc/ocserv"
conf="/etc/ocserv/ocserv.conf"
......@@ -432,7 +432,8 @@ Save_iptables(){
iptables-save > /etc/iptables.up.rules
}
Set_iptables(){
echo "1" > /proc/sys/net/ipv4/ip_forward
echo -e "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
sysctl -p
ifconfig_status=$(ifconfig)
if [[ -z ${ifconfig_status} ]]; then
echo -e "${Error} ifconfig 未安装 !"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册