You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fail2ban-client unban should print what it unbanned.
Description
Currently, fail2ban-client unban 1.2.3.4 prints the number of ip addresses it unbanned. If 1.2.3.4 is currently banned, it prints 1, otherwise 0. If you call it with a netmask like 1.2.3.0/24, and multiple addresses are banned in that subnet, it returns the number of addresses it unbanned.
It would be more useful if fail2ban-client would print out the addresses it unbanned similar to fail2ban-client banned. Note that fail2ban-client banned on it's own tells me the jail and ip address, but if run as fail2ban-client banned 1.2.3.4, it tells me which jails this ip address are in. But it doesn't tell me which ip addresses are banned within a netmask, as in 1.2.0.0/16. (It would be nice it if did that!)
Considered alternatives
I considered writing some wrapper script to do this but it seems like it's going to be easier to do this within fail2ban-client.
Any additional information
If you are worried about backwards compatibility that someone might have used the output number, then, create a new client function like fail2ban-client unbanip which returns the list of ip addrs it unbanned, a list of the jain and the addrs it unbanned similar to fail2ban-client banned.
Lastly, it would be intuitive if the output of such a thing could then be fed back to fail2ban-client to re-ban, or to ban something on another host.
The text was updated successfully, but these errors were encountered:
Feature request type
fail2ban-client unban should print what it unbanned.
Description
Currently,
fail2ban-client unban 1.2.3.4
prints the number of ip addresses it unbanned. If 1.2.3.4 is currently banned, it prints 1, otherwise 0. If you call it with a netmask like 1.2.3.0/24, and multiple addresses are banned in that subnet, it returns the number of addresses it unbanned.It would be more useful if fail2ban-client would print out the addresses it unbanned similar to
fail2ban-client banned
. Note thatfail2ban-client banned
on it's own tells me the jail and ip address, but if run asfail2ban-client banned 1.2.3.4
, it tells me which jails this ip address are in. But it doesn't tell me which ip addresses are banned within a netmask, as in 1.2.0.0/16. (It would be nice it if did that!)Considered alternatives
I considered writing some wrapper script to do this but it seems like it's going to be easier to do this within fail2ban-client.
Any additional information
If you are worried about backwards compatibility that someone might have used the output number, then, create a new client function like
fail2ban-client unbanip
which returns the list of ip addrs it unbanned, a list of the jain and the addrs it unbanned similar tofail2ban-client banned
.Lastly, it would be intuitive if the output of such a thing could then be fed back to fail2ban-client to re-ban, or to ban something on another host.
The text was updated successfully, but these errors were encountered: