How to Unban an IP properly with Fail2Ban

on all fail2ban versions and everywhere

Posted by tfran on 2016-07-08 09:06:36

The answer of ukoda is wrong:

Call fail2ban-client without parameters and you see a list of possible commands:


get JAIL actionunban ACT          

This gets the unban command for the action ACT for JAIL.

Look into the action parameter of the jail you defined, you probably have an iptables action and maybe some more like sendmail, 

 

whois or whatever. so in case your action was iptables it will look like this:

fail2ban-client get JAIL actionunban iptables

and the answer will be:

iptables -D fail2ban-NAME -s IP -j DROP

It will only show you what you would have to write for an unban. There is no unban command itself.