More details on Fail2ban unban page in Cockpit

At the Moment, the unban page in Cockpit shows IPs only.
Sometime it wold be helpful to have more Informations about the reasons of banning.
(like details in fail2ban email report, but i am missing here some things too)

Details could be are:

  • the service (log) that was the reason for the ban (essential)
  • where comes the banned IP (Country or Location)
  • the associated username (this would be very helpful)
  • maybe the (last) loglines where fail2ban is stumbled

Regards
yummiweb

we parse the ipset, we have no information of it, sure a world map with the country will be nice, however we have to query the sqlite database of fail2ban. Not sure about the priority

I dont know how many details are in the sqlite database of fail2ban.
i think about some details grepped from “fail2ban-listban” to get infos about the corresponding jail
and a “whois [IP] | grep descr: -A 2” (or something) to become some further infos.
Maybe with additional infos from “geoiplookup [IP]”.
(needs packages GeoIP and GeoIP-data)

I can use this in terminal but i think it would be more straightforward to integrate this infos in the Cockpit Fail2ban unban panel. Unfortunately, I don’t know how.

Regards
yummiweb

1 Like

Old info but maybe it gives some ideas:
https://www.fail2ban.org/wiki/index.php/HOWTO_use_geoiplookup

A quick search shows someone else had the same thought (just linking one of the first results):

older projects were fail2rest + fail2web, Suspicious, fail2ban + splunk… some newer ones make use of ELK with fail2ban

1 Like