From 8b407e488769e9f8703d5bf531aab10b623000d5 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Sun, 29 Mar 2015 09:37:49 +0800 Subject: [PATCH] Update iptables rules --- shadowsocks-go.sh | 2 +- shadowsocks-libev.sh | 2 +- shadowsocks.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shadowsocks-go.sh b/shadowsocks-go.sh index 4b74926..0fbfd44 100644 --- a/shadowsocks-go.sh +++ b/shadowsocks-go.sh @@ -189,7 +189,7 @@ function iptables_set(){ if [ $? -eq 0 ]; then /etc/init.d/iptables status | grep '8989' | grep 'ACCEPT' >/dev/null 2>&1 if [ $? -ne 0 ]; then - /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8989 -j ACCEPT + /sbin/iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8989 -j ACCEPT /etc/init.d/iptables save /etc/init.d/iptables restart else diff --git a/shadowsocks-libev.sh b/shadowsocks-libev.sh index d5b17ea..717207d 100644 --- a/shadowsocks-libev.sh +++ b/shadowsocks-libev.sh @@ -148,7 +148,7 @@ function iptables_set(){ if [ $? -eq 0 ]; then /etc/init.d/iptables status | grep '8989' | grep 'ACCEPT' >/dev/null 2>&1 if [ $? -ne 0 ]; then - /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8989 -j ACCEPT + /sbin/iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8989 -j ACCEPT /etc/init.d/iptables save /etc/init.d/iptables restart else diff --git a/shadowsocks.sh b/shadowsocks.sh index 3b8a733..7c1928e 100644 --- a/shadowsocks.sh +++ b/shadowsocks.sh @@ -161,7 +161,7 @@ function iptables_set(){ if [ $? -eq 0 ]; then /etc/init.d/iptables status | grep '8989' | grep 'ACCEPT' >/dev/null 2>&1 if [ $? -ne 0 ]; then - /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8989 -j ACCEPT + /sbin/iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8989 -j ACCEPT /etc/init.d/iptables save /etc/init.d/iptables restart else