-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[RFE]: add ip-api.com info to fail2ban.log for jail members #3790
New issue
Have a question about this project?< 8000 /strong> 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
Comments
Geolocation? In between (as long as not implemented) one could try something like that:
However it'd work only for maximal 100 IPs, otherwise raises an error "HTTP 422 Unprocessable Entity", so one have to buffer them with max 100 IPs per chunk.
So an alternative could be asynchronous service updating the tickets in the database (to avoid repeated bulk queries for already "known" IPs). |
Yes, it would be a nice solution. |
So? Let's do it? |
Let us define the order of RFEs regarding the precedence questions by ourselves, please. |
Yes, of course. |
Fixes fail2ban#3790 This should be a good fix for issue fail2ban#3790, ip-api is a pretty nice API but I haven't had a ton of time to play with it so I might be missing something. I would greatly appreciate any review on this if someone wanted to help. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/fail2ban/fail2ban/issues/3790?shareId=XXXX-XXXX-XXXX-XXXX).
I would also be pretty interested in this, I was playing with the ip-api today and it seems pretty awesome. @sebres I made a small pull request. |
what about using an "offline" geo-ip database instead of doing an API request to a web server? https://db-ip.com/db/ you would only need to do some monthly database rotation, as they publish new databases on a monthly base |
If you are interested, you can take a look at this request: #3687. From my experience of running fail2ban, geoip alone does not cut it. ASN is also an important metadata. This uses an offline local database and gives both country and ASN information. I am not sure with Fail2ban how important city information is but my experience says that a combination of country and ASN, also known as data centers, could be quite useful. The database is updated daily, comes with full accuracy, and is licensed under CC-BY-SA 4.0 without an EULA. I work at IPinfo, by the way. We also have a solid free API to offer that provides zip code level accuracy along with ASN. |
Feature request type
Description
Considered alternatives
Any additional information
The text was updated successfully, but these errors were encountered: