Tuesday, November 17, 2026

cidr-ip-ranges-by-country for country-scoped network filtering and geolocation data

cidr-ip-ranges-by-country for country-scoped network filtering and geolocation data

cidr-ip-ranges-by-country is a curated dataset of CIDR blocks mapped to countries, aimed at authorized professionals building firewall rules, network filtering policies, and OSINT geolocation workflows.

Toolebrasha/cidr-ip-ranges-by-country — country-mapped CIDR IP range dataset for geolocation, firewall rules, and network filtering
CategoryNetwork data / IP intelligence dataset
Primary UseBuilding country-scoped firewall allow/deny lists, ACL generation, and OSINT geolocation enrichment in authorized environments
Safe UseFor authorized administrators and security teams applying geoblocking and traffic-filtering policy on systems they own or are contracted to assess
Telemetry NoteAs a static data resource it emits no traffic itself; defenders observe its use indirectly via country-based ACL hits and geoblocking logs on perimeter devices

ebrasha/cidr-ip-ranges-by-country, maintained under the ebrasha umbrella associated with abdal-security-group and Ebrahim Shafiei, is not a scanner, an exploit framework, or a proxy tool. It is a data publication: a structured collection of CIDR blocks organized by country, intended to be consumed by whatever filtering, enrichment, or analysis pipeline an operator already runs. The repository sits at a modest 103 stars on GitHub, with its default branch on master and no populated README at the time of this writing, which means the repo topics and title carry most of the declarative weight about intent and scope.

What the repository explicitly advertises, through its topic list, is a broad but coherent set of use cases: geolocation-database, ip-geolocation, ip-ranges-by-country, cidr, cidr-ip, cidr-range, and iplist. Read together, these signal that the deliverable is per-country IP allocations expressed in CIDR notation, the standard compact format — a.b.c.d/len — used by essentially every routing and filtering platform on earth. That format choice is the whole point of the project: raw allocation data from regional internet registries is not directly consumable by iptables, nftables, cloud ACL engines, or pf, but CIDR lists are.

The remaining topics situate the dataset in a security-practitioner context rather than a purely network-engineering one. osint, bugbounty, and pentesting appear alongside pentesting-adjacent tagging, which tells you the maintainer expects the audience to include authorized assessment professionals. In practice, an analyst scoping a bugbounty program that permits only certain jurisdictions, or a consultant trying to quickly answer which ASN-adjacent space belongs to a given country during scoping, benefits from a pre-normalized country-to-CIDR mapping without writing registry-parsing glue themselves.

Because the README is empty in the current snapshot, the honest analytical position is to reason from what is verifiable: the repository name, its topics, and its provenance. There is no claim in the visible metadata of update frequency, registry sourcing method, or per-file structure, and this article will not invent any. Operators evaluating the dataset for production use should verify lineage themselves — the authoritative free sources for this class of data are the RIR delegation files published by ARIN, RIPE NCC, APNIC, LACNIC, and AFRINIC, plus IANA allocations, and any country-CIDR dataset is ultimately a transform of those.

For defensive work, which is the least controversial application, the dataset functions as raw material for geoblocking. An administrator with a Linux perimeter could use the per-country lists as input to ipset plus iptables/nftables, or paste normalized ranges into cloud provider rule groups in AWS security groups, GCP firewall policies, or Azure NSG rules. The value proposition is time: converting registry delegation files into clean country-grouped CIDR sets is fiddly scripting work, and a maintained published artifact removes that friction. This is policy enforcement on infrastructure you own — squarely the authorized context this publication documents.

For OSINT and investigative work, country-mapped CIDR data serves as an enrichment layer. When triaging logs, WHOIS output, or passive DNS results, being able to bucket observed addresses by country quickly supports reporting, anomaly narrative, and infrastructure-mapping exercises. It is coarse intelligence — country-level attribution says nothing about hosting provider, ASN reputation, or actual actor location, and professionals should treat it as one axis among many rather than evidence in itself. IPv4 allocation density also means large countries have enormous lists, so tooling that consumes them should handle tens of thousands of prefixes gracefully.

From an assessment-scoping angle, the bugbounty and pentesting topics suggest another role: scope reconciliation. Programs frequently restrict testing to assets in specific countries or exclude certain jurisdictions, and an operator cross-referencing in-scope IP space against country CIDR sets can catch scope drift before touching anything out of bounds. This is a compliance-hygiene function, and it is exactly the kind of careful, documented behavior that separates professional engagements from careless ones. Everything in this workflow remains within the written authorization of the engagement.

Operationally, there are quality considerations any senior operator will immediately probe. Country-to-IP mapping is inherently fuzzy: RIR allocation reflects registration, not geolocation; announced prefixes differ from allocated ones; VPN and satellite uplinks break the model entirely; and IPv6 coverage is a question the visible metadata does not answer. If the dataset is IPv4-only, that should be stated; if it includes IPv6, the file sizes and structure matter. Any consumer should diff the dataset against current RIR delegation files before trusting it for enforcement, since stale ranges produce both false blocks and false passes — the latter being the dangerous failure mode in a defensive deployment.

On maintenance posture, the observable signals are neutral-to-thin: an active maintainer identity (ebrasha / Ebrahim Shafiei, with the abdal-security-group branding suggesting a portfolio of security utilities), a topic taxonomy consistent with the tool's purpose, but no license field populated in the repository metadata. The absent license deserves emphasis: without an explicit LICENSE, default copyright applies and downstream redistribution or bundling into commercial products is legally murky. Teams intending to embed the data in shipped tooling should either confirm licensing with the maintainer or regenerate equivalent data from RIR sources, which are explicitly public domain in their raw form.

In sum, cidr-ip-ranges-by-country occupies the humble but useful niche of preprocessed network geography. It is the sort of repository that never trends but saves an afternoon of scripting whenever country-level filtering or enrichment is needed. The recommendation for readers of this publication is documentary and educational: understand what it is (a data artifact), verify what it lacks (documented sourcing, licensing, update cadence), and deploy it only inside authorized, owned, or contracted infrastructure — as input to firewall policy, OSINT enrichment, and scope validation, never as a substitute for actual geolocation intelligence in anything consequential.

Official project repository for ebrasha/cidr-ip-ranges-by-country.
Download Tool

Educational analysis for authorized security professionals. Use only in controlled, authorized environments.

Sponsored
Share articleFacebookXLinkedIn

Continue exploring

Browse all articles →

0 comentários:

Post a Comment

Note: Only a member of this blog may post a comment.