Neckrez

Fail2ban jail.local generator

Ban addresses that keep guessing passwords or scanning your site. Pick the jails, set how many failures earn a ban and for how long, and get a jail.local that works on current Ubuntu and Debian.

Why jail.local

jail.conf is replaced on package updates. Everything in jail.local overrides it and stays. List only what you change; the rest comes from the defaults.

Journal or log files

Newer Debian and Ubuntu no longer write /var/log/auth.log by default, so the SSH jail has to read the systemd journal (backend = systemd, which needs python3-systemd). nginx still writes plain log files, so its jails read those.

Useful commands

More tools