Skip to content

[Feature Request] Integrating IPinfo's free IP to Country ASN database #7779

Description

@abdullahdevrel

Update: #7779 (comment)

We are offering the network/CIDR based IP dataset.


Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Is your feature request related to a problem? Please describe.

Using the IPinfo IP to Country ASN or IP to Country database will address several problems with the current IP geolocation implementation:

  • It enables users to have an alternative (if not replacement) source of data than the current free. Support other GeoIP sources #6264
  • IPinfo's country-level database provides full accuracy and is updated daily. The current database intentionally provides a compromised accuracy database as they have a paid version of the country database.
  • It packages both IPv4 and IPv6 in a single database, eliminating the need to use multiple databases.
    print ("IPv4 filename : %(IPv4)s" % data['address_sources'])
    print ("IPv6 filename : %(IPv6)s" % data['address_sources'])
  • The ASN/ISP data provided is useful and can be sourced from this single database.
  • The project can also have its own project-specific download access token, eliminating the need for users to bring their own access token and reducing setup time.

Describe the solution you like

I am requesting to add support for IPinfo's IP to Country database to the project. The database has the following features:

  • It includes country and ASN information in the same database.
  • It is updated daily, with zero compromise to accuracy. There is no range clustering, and the database provides full accuracy.
  • The data granularity reaches individual IP level.
  • The database comes in MMDB database format.
  • It is licensed under CC-BY-SA 4.0, permitting commercial usage.
  • Available file formats include: CSV, MMDB, JSON
  • The data is tabular and unnested, making it very easy to use. The dataset includes both IPv4 and IPv6 in a single file.

Database schema

Field Name Example Data Type Description
start_ip 1.0.16.0 TEXT Starting IP address of an IP address range
end_ip 1.0.31.255 TEXT Ending IP address of an IP address range
country JP TEXT ISO 3166 country code of the location
country_name Japan TEXT Name of the country
continent AS TEXT Continent code of the country
continent_name Asia TEXT Name of the continent
asn AS2519 TEXT Autonomous System Number
as_name ARTERIA Networks Corporation TEXT Name of the AS (Autonomous System) organization
as_domain arteria-net.com TEXT Official domain or website of the AS organization

Documentation: https://ipinfo.io/developers/ip-to-country-asn-database

Samples are available here: https://github.com/ipinfo/sample-database/tree/main/IP%20to%20Country%20ASN

The database can be downloaded simply by accessing the storage URI with an access token.

curl -L https://ipinfo.io/data/free/country_asn.mmdb?token=<YOUR_TOKEN> -o country_asn.mmdb

Describe alternatives you considered

A clear and concise description of any alternative solutions or features you considered.

I have not considered an alternative.

Additional context

The business version of OpnSense includes a paid version of the GeoIP country database. However, even though IPinfo's IP to Country database is free, it is the best country-level data available out there because the data source itself is based on latency and networking data-based methodology instead of self-reported locations of ASNs/ISPs.

https://ipinfo.io/accuracy

Additionally, there is no range clustering or delayed updates with IPinfo. IPinfo does not have an accuracy-compromised free country or city database. This database can be considered for the business variant of the software as well and license is permissive to commercial usage.

Metadata

Metadata

Assignees

Labels

featureAdding new functionalityroadmapMajor roadmap item

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions