fix blacklist

This commit is contained in:
Valentin CZERYBA 2023-03-02 23:56:46 +01:00
parent 17cc54b85f
commit 76deffe6f4

View File

@ -4,8 +4,8 @@ BLACKLIST=/etc/sentinel/blacklist
chain_count=$(iptables -L BLACKLIST -n | wc -l)
if [ ${chain_count} -eq 0 ]; then
iptables -N BLACKLIST
iptables -A INPUT -p tcp -m tcp --dport 80 -j BLACKLIST
iptables -A INPUT -p tcp -m tcp --dport 443 -j BLACKLIST
iptables -I INPUT 1 -p tcp -m tcp --dport 80 -j BLACKLIST
iptables -I INPUT 1 -p tcp -m tcp --dport 443 -j BLACKLIST
fi
if [ ! -f ${BLACKLIST} ]; then