fail2ban ip database: api

[ip database] [ip blacklist] [report ip] [stats] [help] [api key ]

See the api page how to optain your own api key.

Download IP-Blacklist to block most offending IP-addresses in firewalls or applications:

minimim hits from ip
time period in days within ip was detected
max number of records returned

download ip blacklist: https://fail2ban.bytefarm.ch/fail2ban/blist?g=

https://fail2ban.bytefarm.ch/fail2ban/blist?[g=][&s=<service>][&t=<time_in_secs>][&h=<num_of_hits>][&l=<limit>] https://fail2ban.bytefarm.ch/fail2ban/blist?g=&t=2592000&h=30&l=65536 Note: If no api key is provided at this point, a global blacklist from all database records will be generated $ curl [-s] [--compressed] [-F "s=<service>"] [-F "t=<time_in_secs>"] [-F "h=<num_of_hits>"] [-F "l=<limit>"] [-F "g="] "https://fail2ban.bytefarm.ch/fail2ban/blist" $ curl -s --compressed -F "g=" -F "h=30" -F "t=2592000" -F "l=65536" "https://fail2ban.bytefarm.ch/fail2ban/blist"

Use a shell script to automate the download of latest ip-blacklists and the creation of the ipsets for the firewall.

Install the ipset package on your system to use ipset for iptables:

$ sudo apt install ipset -y

Insert/update the rules into ipset/iptables and create make a cron job entry to schedule script execution:

$ sudo crontab -e
*/5     *       *       *       *       /etc/fail2ban/scripts/blist.sh 
Σ = 75347 | Δt = 0.010028123855591s