while read line; do sudo ufw insert 1 deny from $line to any; done < /tmp/firewall.txt
while read line; do sudo ufw insert 1 deny from $line to any; done < /tmp/firewall.txt
Line 32:
Line 32:
</pre>
</pre>
run by cron hourly..
run by cron hourly..
+
+
Info:
+
+
This Script scan the mail.log File for "rejected" entries (replace rejected by fail or other abuse words you see at the log, cut the IP, delete empty lines and write to firewall.txt