From a2b660b971bf389fbf00307d6d7d5e8c668d37b8 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Sun, 4 Sep 2016 00:32:38 +0900 Subject: [PATCH] Update: iptables set --- shadowsocks-libev.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks-libev.sh b/shadowsocks-libev.sh index 3e36549..4406515 100644 --- a/shadowsocks-libev.sh +++ b/shadowsocks-libev.sh @@ -171,7 +171,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}' > /dev/null 2>&1 + iptables -L -n | grep -i ${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