Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFE]: fail2ban-client unban should print what it unbanned #3654

Open
mgrant0 opened this issue Dec 26, 2023 · 0 comments
Open

[RFE]: fail2ban-client unban should print what it unbanned #3654

mgrant0 opened this issue Dec 26, 2023 · 0 comments

Comments

@mgrant0
Copy link
Contributor

mgrant0 commented Dec 26, 2023

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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant