Fixed iptables issue in CentOS 6
This commit is contained in:
parent
3fde9d8a48
commit
c35de4a787
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user