From 62e41c1e8e68a93106d428e0471bf6912da94fe4 Mon Sep 17 00:00:00 2001 From: CREATIVE_tg1 Date: Wed, 15 Apr 2026 11:26:55 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20server/ip-blocker.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/ip-blocker.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/ip-blocker.sh b/server/ip-blocker.sh index 6ba36ff..f608f9a 100644 --- a/server/ip-blocker.sh +++ b/server/ip-blocker.sh @@ -11,6 +11,8 @@ fi BAN_CMD=/usr/local/bin/ban-ip UNBAN_CMD=/usr/local/bin/unban-ip +IPTABLES_CMD="/usr/sbin/iptables" + # Скрипт: ban-ip cat > "$BAN_CMD" <<"EOF" #!/bin/bash @@ -19,7 +21,7 @@ if [ $# -ne 1 ]; then exit 1 fi IP="$1" -iptables -I INPUT -s "$IP" -j DROP +$IPTABLES_CMD -I INPUT -s "$IP" -j DROP echo "Забанен IP $IP (iptables)" EOF @@ -31,7 +33,7 @@ if [ $# -ne 1 ]; then exit 1 fi IP="$1" -iptables -D INPUT -s "$IP" -j DROP +$IPTABLES_CMD -D INPUT -s "$IP" -j DROP echo "Разбанен IP $IP (iptables)" EOF