Skip to content

109 Sandbox

A website made for testing

Unban an IP address in fail2ban

Published ·UPD ·In Linux

2020-06-13: Copied to recipes.op111.net

With fail2ban 0.10.0 and later, to remove an IP address from all fail2ban jails as well as from the fail2ban database:

sudo fail2ban-client unban <IP-ADDRESS>

The old syntax, which required to specify a jail, can still be used to remove an IP from a specific jail:

sudo fail2ban-client set <JAIL-NAME> unbanip <IP-ADDRESS>

To view all active jails:

sudo fail2ban-client status

To view all IPs in a jail (most recent entries at the end):

sudo fail2ban-client status <JAIL-NAME>