# fail2ban-client command builder

> Build the exact fail2ban-client command for your jail and IP: unban, ban, list banned IPs, whitelist, read or change settings, reload — with sudo or Docker.
>
> Source: https://fail2ban.dev/tools/command-builder/ · Updated 2026-10-25 · Checked against fail2ban 1.1.1
> fail2ban.dev is an independent guide, not the official fail2ban project.

## What it covers

The builder knows the everyday tasks — unbanning, banning, listing bans with their expiry, runtime whitelisting, reading and changing jail settings, reloads and config tests — and explains what each command prints. The complete list of 96 client commands is in the [fail2ban-client reference](/commands/), and the printable [cheat sheet](/cheat-sheet/) fits the essentials on one page.

## Jail names

Commands take the **jail** name — the section name in `jail.local` (`[sshd]`, `[nginx-http-auth]`) — not the filter file. `sudo fail2ban-client status` lists the jails that are running. If you get `Sorry but the jail 'x' does not exist`, the jail isn't enabled or the name is misspelt.

## Running fail2ban in Docker

When fail2ban runs in a container (for example `crazymax/fail2ban` or `linuxserver/fail2ban`), the client lives inside it. Tick the Docker option and the builder prefixes the command with `docker exec <container>`. With Docker Compose you can also use `docker compose exec fail2ban fail2ban-client status`. See [fail2ban in Docker](/guides/docker/).

## FAQ

### What does fail2ban-client print after unbanip or banip?

A number: how many addresses were actually unbanned or banned. `0` after `unbanip` means the IP wasn't banned in that jail.
