Fail2ban
Ban addresses that keep guessing passwords, with jails to turn on, set the ban rules, keep your own address on the never-ban list, and ban or unban addresses by hand.
The firewall decides which ports are open. Fail2ban decides who gets to keep knocking. It watches log files for failed sign-ins and bans any address that gets it wrong too many times. Open Fail2ban under Security in the sidebar.
The panel drives the real fail2ban service, so what you set here is what
fail2ban-client status reports. A badge at the top right shows Running and
the version (Version 1.0.2).

The screen has two tabs: Protection (jails and banned addresses) and Ban rules (the numbers, and the never-ban list). A small dot on Ban rules means "Needs your attention": your current address is not on the never-ban list yet.
If it is not installed yet
On a server without fail2ban the page shows Fail2ban is not installed and one Install fail2ban button. The install takes about a minute and switches nothing on: "you pick what to watch afterwards." While it runs the page reads Installing Fail2ban… and updates itself when it is done. If it is slow, a note says "This is taking longer than usual. It may still be working." If it fails, you get Fail2ban could not be installed and Try installing again; nothing has changed on the server.
If fail2ban is installed but stopped, the screen says "Fail2ban is not running, so nothing is being watched and nobody is being banned." with Start it in Services (Services).
Jails
A jail watches one service. Each jail is a switch:
| Jail | What it does |
|---|---|
SSH (sshd) | Bans an address that gets the SSH password or key wrong too many times. |
Repeat offenders (recidive) | "An address banned 3 times in a day is banned from every service for a week." |
Under each jail's name, a badge and a line say what it is doing:
| Badge | Meaning |
|---|---|
| Off | Not watching. The jail is off and nothing is being checked. |
| Enabled | Enabled — no failed attempts or active bans reported. |
| N failing | N addresses failing right now. They are part-way to a ban. |
| N banned | N addresses banned. Bans are in force. |
If the panel cannot read the activity numbers it says "Enabled — activity data is unavailable." Hover the badge for the totals since Fail2ban started (wrong tries and bans). What is a jail? at the top explains the idea in a few lines.
On a server where no jail is on yet, a card Your server is not protected yet offers Set up protection. It switches on all the jails and, once the panel knows your address, adds it to the never-ban list first, so you cannot lock yourself out.
Turn a jail on or off
Use the switch on the jail. A message confirms ("SSH is on", "SSH is off").
A jail can lock you out of your own server
Fail2ban does not know which address is yours. The SSH jail carries the hint "This one can ban you from your own server if your address is not on the never-ban list." If your address is not on that list when you turn it on, the dialog This could lock you out opens. Type Address to keep unbanned (the address you connect from, not necessarily the one shown) and click Add this address and turn it on, or choose Turn it on anyway if you accept the risk.
Banned addresses
Banned addresses lists who is banned right now, with the columns Address, Jail, Banned (how long ago), Time left and an Unban button. Time left reads 50 minutes left, Permanent, Ending now or Not known. When nobody is banned it says Nobody is banned.
- The refresh button reloads the list.
- See the log opens the fail2ban log in System logs, where you find out why something was banned.
- With more than 8 bans, Search address appears (plus an All jails filter when several jails have bans), and the list shows 10 a page with Previous and Next.
Ban an address by hand
-
Click Ban an address.

-
Enter one address. A range is refused ("That is not a valid IP address. Ranges are not allowed here.").
-
Pick the Jail the ban is recorded under, then click Ban. The ban lasts for the ban time from the Ban rules tab. "203.0.113.9 banned."
The panel refuses three addresses: your own ("This is your own address. The server won't ban it — it would lock you out."), the server's own address (it would cut the panel off from its database), and any address on the never-ban list ("That IP address is on your ignore list. Remove it there first if you really want to ban it.").
Unban
Unban on a row lifts one ban (Unban 203.0.113.9?). Unban all lifts every ban. Both ask first, and say what happens next: the address can reach the server again straight away, and fail2ban bans it again if it trips the same rules.
Ban rules
The Ban rules tab holds three numbers, and the never-ban list on its right.

| Field | Values |
|---|---|
| Wrong tries allowed | A whole number from 2 to 100. One wrong try is usually a typo, which is why the lowest value is 2. |
| Counted within (seconds) | 30 to 86400 (one day). Older wrong tries are forgotten, so slow guessing never adds up to a ban. A line under the field shows it in words (10 minutes). |
| Banned for | 10 minutes, 1 hour, 1 day, 1 week or Forever. A value set some other way shows as N seconds (now). The API takes -1 for a permanent ban, otherwise at least 60 seconds and at most one year. |
The Rule preview puts the policy in one sentence: "With these values, 5 wrong tries in 10 minutes would ban an address for 1 hour." It changes as you type; Save ban rules applies the values. Saving reloads fail2ban, which takes a few seconds ("This can take a few seconds — Fail2ban is being reloaded."), then says "Ban rules saved."
The rules apply to every jail, except that Repeat offenders keeps its own rule (3 bans within a day, banned for a week).
Never ban these
Never ban these is the safety net: addresses on the list are never banned, however
many times they get it wrong. Localhost (127.0.0.1/8 and ::1) is always excluded
and is not shown. The card header counts the entries (0 entries).
- Type an IP address or range, like 203.0.113.0/24 and click Add. Every entry is its own change: there is no draft and no Save button, and it applies within a few seconds ("203.0.113.5 added. Fail2ban will not ban it.").
- Use the remove button on an entry (Remove 203.0.113.5) to take it off. "203.0.113.5 removed from the list."
- If the address you are connected from is missing, a notice says "Your current address … is not excluded from bans." and offers Add my address. Your own entry is tagged you.
- Removing the entry that covers your own address while the SSH jail is on asks you to confirm Remove your own address? — from then on that jail can ban you and cut off your access. Click Remove it only if you mean it.
The list holds at most 100 entries ("That is the most addresses this list can hold (100). Remove one to add another."); use a range to cover several addresses. Adding an entry that is already there says "203.0.113.5 is already on this list."
Limits
- Wrong tries 2 to 100, counted within 30 to 86400 seconds, ban time at least 60 seconds (or forever) and at most one year.
- The never-ban list holds up to 100 entries.
- A ban by hand takes one address, never a range.
- Fail2ban reacts; it does not prevent. It bans after the wrong tries have already happened. Keys instead of passwords, and a firewall rule scoped to your own address, prevent.
- Bans are per jail. An address banned in
sshdcan still reach your website unless a web jail is watching too. - The per-application Fail2ban screen is a separate feature that watches one application's login page. See Application Fail2ban.
Who can do this
- The Fail2ban permission: View shows the jails, bans and rules; Manage is needed to install fail2ban, switch jails, save the ban rules, edit the never-ban list and ban or unban. With View only, those controls are not available.
Common errors
- We could not check Fail2ban just now. That does not mean your server is open — we just could not get an answer. — reload; if it persists, check System logs.
- Enabling the SSH jail can lock you out of this server. Add your IP address to the ignore list, or confirm that you accept the risk. — see the lockout dialog above.
- That IP address is not currently banned. — it was lifted already; refresh the list.
- Ban time must be at least 60 seconds, or -1 for a permanent ban.
- The panel did not write … so it will not overwrite it. — fail2ban is already configured in that file by hand or by another panel. Move or remove the file if you want the panel to manage these settings.
- fail2ban is installed but not running. — start it from Services.
- The fail2ban operation failed. — the message gives a reference; look it up in System logs.