As I exclusively use ipset bans, until recently I've been able to get a list of all bans for all jails by using an ipset command, 'ipset list -o save | grep "add f2b"'. My report is now broken in 0.11.2 as all timeouts get loaded as 0 (perma-bans but they do get unbanned by an action-unban). Is there a way to get a list of all bans in a single command using fail2ban-client?

Currently I can do:
[root@server ~]# fail2ban-client get apache-404 banip --with-time
83.224.142.4    2021-11-18 04:37:55 + 432001 = 2021-11-23 04:37:56
13.214.131.27   2021-11-18 20:38:39 + 432000 = 2021-11-23 20:38:39
159.203.115.159         2021-11-19 00:16:54 + 432000 = 2021-11-24 00:16:54
118.26.36.169   2021-11-19 09:06:12 + 432000 = 2021-11-24 09:06:12
159.223.36.192  2021-11-19 13:18:21 + 432000 = 2021-11-24 13:18:21
185.142.236.43  2021-11-19 14:55:41 + 432000 = 2021-11-24 14:55:41
45.201.206.80   2021-11-19 21:58:42 + 432000 = 2021-11-24 21:58:42

But I cannot use a wildcard for the jail. With this output I could calculate the ban time remaining with a simple sum on either the start or end time.

Is there any way to achieve what I want?

Thanks,
Nick



_______________________________________________
Fail2ban-users mailing list
Fail2ban-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fail2ban-users

Reply via email to