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]: Load ignore/whitelist IP address list from separate local configuration files instead of main configuration file to automatically update. #3307

Closed
Chathu07 opened this issue Jun 17, 2022 · 2 comments

Comments

@Chathu07
Copy link

Chathu07 commented Jun 17, 2022

If the Fail2ban support load whitelist/ignores IP list from a separate configuration file, this can help to periodically update the ignore IP list using a cron job.

This is important because major search engines Google and Bing released the official bots' IP address range. Furthermore, some CDN services (Amazon AWS) periodically update the IP address list. As per their site, these IPs can be changed periodically. These services released the IP address list in JSON format for easy importing.

We can easily set up a bash script to import these IPs from their sites to our local machine configuration file. But with Fail2ban, it does not support importing a whitelist IP address list from a separate file.

I believe if the Fail2Ban can import (cron job to run periodically) these JSON files' IP addresses or load ignored IP lists from a separate local file, it would be a good option to prevent a fall positive ban. (instead of adding every IP to Fail2Ban main configure file).

Google bot IP: https://developers.google.com/search/apis/ipranges/googlebot.json
Bingbot IP list: https://www.bing.com/toolbox/bingbot.json
Amazon AWS IP list: https://ip-ranges.amazonaws.com/ip-ranges.json

@Chathu07 Chathu07 changed the title [RFE]: Load whitelist IP address from remote json files. [RFE]: Load ignore/whitelist IP address from local configuration files instead of main configuration file to automatically update. Jul 16, 2022
@Chathu07 Chathu07 changed the title [RFE]: Load ignore/whitelist IP address from local configuration files instead of main configuration file to automatically update. [RFE]: Load ignore/whitelist IP address list from local configuration files instead of main configuration file to automatically update. Jul 16, 2022
@Chathu07 Chathu07 changed the title [RFE]: Load ignore/whitelist IP address list from local configuration files instead of main configuration file to automatically update. [RFE]: Load ignore/whitelist IP address list from separate local configuration files instead of main configuration file to automatically update. Jul 16, 2022
@redbullpeter
Copy link

I'm dealing with a similar issue with whitelisting Cloudflare IP addresses.

@sebres
Copy link
Contributor

sebres commented Dec 7, 2022

Sorry for delay (it has fallen into oblivion)...

Well, such configuration possibility would not really provide advantage, because:

  • the list is dynamic (if I understand correctly), so the jails using that need to be updated once some of that lists gets changed;
  • it is not really necessary, since there are no advantages against ignorecommand

For similar issue see #2013 (comment) and below.

Thus I'll close this RFE now.

@sebres sebres closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2022
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

3 participants