Update rhel.sh

This commit is contained in:
midoks 2022-12-28 17:26:56 +08:00
parent 0d2721523c
commit 155b8d2b4c
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,8 @@ if [ -f /usr/sbin/iptables ];then
# iptables -nL --line-number
echo "iptables start"
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
@ -48,6 +50,8 @@ if [ -f /usr/sbin/iptables ];then
fi
#安装时不开启
service iptables stop
echo "iptables end"
fi
if [ ! -f /usr/sbin/iptables ];then