65 cards
Posted over 6 years ago. Visible to the public.

How to unban host with Fail2ban

To see all jails:

fail2ban status

Our $JAIL is usually ssh.

To see which IPs are banned currently:

fail2ban-client status ssh

If you want to unban a host banned by fail2ban on Ubuntu 14.04 or later use this method:

fail2ban-client set $JAIL unbanip $IP #example with a jail named ssh fail2ban-client set ssh unbanip

Please don't try to undo the ban by deleting the iptables rule. Fail2ban will recreate the rule if it is missing but fail2ban has still stored the ban.

On 12.04 hosts fail2ban is too old and doesn't know the unbanip action.

sudo iptables -F

is the only way here since sudo service fail2ban restart just re-bans the IP again after starting.

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for unsupported versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2).

Owner of this card:

Claus-Theodor Riegg
Last edit:
over 4 years ago
by Thomas Eisenbarth
ops, block, sshd, firewall, filter
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
This website uses short-lived cookies to improve usability.
Accept or learn more