Description:
I would like to suggest a feature to improve the way geoip-shell fetches and manages IP lists by adding multi-source support and deduplication. Currently, geoip-shell defaults to RIPE and treats imported local lists and fetched lists independently.
Proposed Features:
1. Multiple Options for IP List Sources
- Instead of defaulting to RIPE, provide an interactive checklist or command-line flag during setup to select from various available IP list sources (e.g., RIPE, IPDeny, IPinfo, MaxMind).
- For sources that require authentication (like IPinfo or MaxMind), prompt the user to run a credential setup step before fetching.
2. Source Merging and Deduplication
- Allow fetching IP lists from multiple selected sources simultaneously.
- Implement a merging and deduplication process to combine the fetched lists into a single, optimized final source before passing it to the firewall backend.
- Example: Fetch
VN_ipv4 from RIPE and VN_ipv4 from IPDeny → merge and deduplicate overlapping CIDRs → output a unified VN_ipv4 list.
- Use this single optimized merged list for configuring the
nftables or iptables ruleset, reducing the size of the IP sets in memory.
3. Deduplication of Online Lists with Local (Imported) Lists
- Extend the deduplication logic to cover user-imported local IP lists.
- When a user imports a
local_allow_ipv4 or local_block_ipv4 file, the script should compare it against the fetched online lists (e.g., country lists) and deduplicate overlapping subnets or specific IPs to ensure the most efficient firewall rules possible, while respecting the precedence of blocklists over allowlists.
Use Case / Motivation:
This would allow users to rely on multiple upstream providers for better accuracy and redundancy without bloating nftables sets or ipset with duplicate entries. Deduplicating local lists against online lists will further optimize memory usage and firewall performance.
Description:
I would like to suggest a feature to improve the way
geoip-shellfetches and manages IP lists by adding multi-source support and deduplication. Currently,geoip-shelldefaults to RIPE and treats imported local lists and fetched lists independently.Proposed Features:
1. Multiple Options for IP List Sources
2. Source Merging and Deduplication
VN_ipv4from RIPE andVN_ipv4from IPDeny → merge and deduplicate overlapping CIDRs → output a unifiedVN_ipv4list.nftablesoriptablesruleset, reducing the size of the IP sets in memory.3. Deduplication of Online Lists with Local (Imported) Lists
local_allow_ipv4orlocal_block_ipv4file, the script should compare it against the fetched online lists (e.g., country lists) and deduplicate overlapping subnets or specific IPs to ensure the most efficient firewall rules possible, while respecting the precedence of blocklists over allowlists.Use Case / Motivation:
This would allow users to rely on multiple upstream providers for better accuracy and redundancy without bloating
nftablessets oripsetwith duplicate entries. Deduplicating local lists against online lists will further optimize memory usage and firewall performance.