diff --git a/server/ip-blocker.sh b/server/ip-blocker.sh index 130cc43..6ba36ff 100644 --- a/server/ip-blocker.sh +++ b/server/ip-blocker.sh @@ -1,5 +1,12 @@ #!/bin/bash +# Проверяем наличие iptables +if ! command -v iptables >/dev/null 2>&1; then + echo "iptables не найден. Устанавливаю..." + sudo apt update + sudo apt install -y iptables +fi + # Путь для команд BAN_CMD=/usr/local/bin/ban-ip UNBAN_CMD=/usr/local/bin/unban-ip