Copy · paste · reload

Fail2ban configs you can actually paste.

Ready-to-use jail.local blocks and filter rules for SSH, Nginx, Apache, mail and WordPress — copy the block, reload Fail2ban, done.

15 recipes

Fail2ban answers are scattered. The config you need isn't.

Each recipe here is a focused, copy-paste answer to one real task — the exact file path, the config block, the reload command, and how to confirm the jail is banning.

FAQ

Are these Fail2ban configs free?

Yes. Every recipe is free to read and copy, with no account or paywall.

Where do I paste these configs?

Jails go in /etc/fail2ban/jail.local; custom filters in /etc/fail2ban/filter.d/. Reload with "fail2ban-client reload".

Will it lock me out?

It can if you trip your own jail. Whitelist your IP with ignoreip first and keep a second console open.

No /var/log/auth.log on my distro?

On systemd distros set backend = systemd on the jail — see the systemd-journald recipe.

Open the full interactive site ↗