Online Tool Store Online Tool Store

Fail2ban Config Generator

Pick the services to protect (SSH, Nginx, WordPress) and your ban thresholds to generate a ready-to-use fail2ban jail.local file.

🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.

Services to protect

jail.local

  

How Fail2ban Config Generator works

  1. Check the services you want fail2ban to protect — SSH, Nginx authentication failures, and/or WordPress login attempts.
  2. Set your ban thresholds: how many failed attempts (maxretry), within what time window (findtime), before the IP is banned, and for how long (bantime).
  3. List any IPs or CIDR ranges that should never be banned, such as your own known-safe address.
  4. Copy the generated jail.local content and place it at /etc/fail2ban/jail.local, then restart the fail2ban service to apply it.

Why jail.local, not jail.conf

Fail2ban ships its defaults in jail.conf, but that file gets overwritten on every package update — the documented convention is to put your own overrides in jail.local, which fail2ban merges on top and which survives upgrades untouched. That's the file this tool generates.

FAQ

What's the difference between findtime, maxretry, and bantime?

maxretry is how many failed attempts are allowed; findtime is the rolling time window those attempts are counted in; bantime is how long the offending IP is blocked once the threshold is hit. So the default 5 failures within 10 minutes triggers a 60-minute ban — set bantime to -1 for a permanent ban.

Do I need to edit anything after copying this into jail.local?

Check the logpath values against your actual server — this generator uses the common default paths (/var/log/auth.log for SSH, /var/log/nginx/error.log for Nginx), but some distributions log to different locations, and the WordPress jail needs a matching custom filter file (fail2ban doesn't ship one by default) before it will do anything.

Why does the WordPress jail default to 3 retries instead of the global setting?

Login pages are a common brute-force target, so it's common practice to ban after fewer failed attempts there than for other services — the generator applies a stricter maxretry of 3 to the WordPress jail specifically, overriding the global default for that one section.

How we compare

Feature Online Tool Store Copying a config from a random forum post A managed server security add-on
No file upload — runs in your browser N/A
No sign-up required
Free, no watermark

A forum post's config was written for someone else's server and thresholds. This generator builds the file from the exact services and thresholds you pick, with no paid security add-on required.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.