From c35de4a787d13e7c3b07920f4093d1d51d21f938 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Mon, 29 Aug 2016 21:30:26 +0900 Subject: [PATCH] Fixed iptables issue in CentOS 6 --- shadowsocks-go.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks-go.sh b/shadowsocks-go.sh index b712b15..fbc4c09 100644 --- a/shadowsocks-go.sh +++ b/shadowsocks-go.sh @@ -211,7 +211,7 @@ function firewall_set(){ if centosversion 6; then /etc/init.d/iptables status > /dev/null 2>&1 if [ $? -eq 0 ]; then - iptables -L -n | grep '${shadowsocksport}' | grep 'ACCEPT' > /dev/null 2>&1 + iptables -L -n | grep '${shadowsocksport}' > /dev/null 2>&1 if [ $? -ne 0 ]; then iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport ${shadowsocksport} -j ACCEPT iptables -I INPUT -m state --state NEW -m udp -p udp --dport ${shadowsocksport} -j ACCEPT