added iptables and nftables integration

This commit is contained in:
BlessedRebuS
2026-02-23 01:23:49 +01:00
parent 69e82fc030
commit 8c81dccc3b
6 changed files with 490 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
#!/bin/bash
# This script fetches a list of malicious IPs from your Krawl instance and adds them to the iptables firewall to block incoming traffic from those IPs.
curl -s https://your-krawl-instance/api/get_banlist?fwtype=iptables | while read ip; do
iptables -C INPUT -s "$ip" -j DROP || iptables -A INPUT -s "$ip" -j DROP;
done