5nafu / fail2ban-blocklist-importer

A small script to import and ban IPs from a list (like from blocklist.de)
GNU General Public License v2.0
12 stars 1 forks source link

fail2ban-blocklist-importer

A small script to import and ban IPs from a list (like from blocklist.de). The list has to be formatted one IP per line, with no additional text.

After fetching the list, the script will add each IP to fail2bans blocklist jail and trigger the actual banning by touching the appropiate log file.

Tested on Debian Wheezy with fail2ban 0.8.6

Configuration

In the script, edit the configuration dict:

If your fail2ban modules are not in /usr/share/fail2ban, you need to change the import on line 11 according to your needs.

TODO

Credit

This script was inspired by Kapsonfile