fail2ban : Ban-Unban an IP address from cli

fail2ban : Ban-Unban an IP address from cli

Useful commands to ban or unban an IP address from cli. For that we will use the fail2ban-client command.


Before unban an ip address, you have to find the jail where the ip address has been ban. To do that, first identify the iptables rule name:
$ iptables -L -n
Find the jail name:
$ fail2ban-client status

and unban the ip address : fail2ban-client set yourjailname unbanip
If you use an older version (before v0.8.8) : fail2ban-client get yourjailname actionunban


It is almost the same to ban an ip address: fail2ban-client set yourjailname banip




My Powershell script categories

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social Media Auto Publish Powered By :
%d bloggers like this: