From 76deffe6f47080e577f5fee938586502f66c0496 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Thu, 2 Mar 2023 23:56:46 +0100 Subject: [PATCH] fix blacklist --- roles/deploy-web/files/refill_blacklist.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/deploy-web/files/refill_blacklist.sh b/roles/deploy-web/files/refill_blacklist.sh index 058e4ae..7238c4d 100644 --- a/roles/deploy-web/files/refill_blacklist.sh +++ b/roles/deploy-web/files/refill_blacklist.sh @@ -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