chaitin / chaitin/SafeLine

[Suggestion] Using IPinfo IP to Country ASN database

Open
#1,035 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
22.6k
Forks
1.5k
Avg merge
4h 30m
Merged PRs (30d)
11

Description

What would you like to be added or improved?

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

### Why is it needed?

Integrating IPinfo's IP to Country ASN database would bring highly accurate country, ASN, and ISP data to the platform. Moreover, since the license is open source-friendly, this will fit perfectly with the platform.

- Provides precise country, ASN, and ISP data down to individual IP addresses, ensuring accurate identification.
- Includes both IPv4 and IPv6 in a single, comprehensive dataset, covering all necessary IP information.
- Updated daily to ensure the WAF platform operates with the most current data.
- Licensed under CC-BY-SA 4.0, allowing open-source and commercial use, ideal for integration into open-source WAF platforms.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked IPinfo documentation and sample-database files, then review SafeLine's existing IP, country, ASN, and ISP data handling. A completed change would define how the IPinfo database is obtained and integrated, including its IPv4/IPv6 coverage, daily updates, token access, and licensing requirements.

Written by the indexing model from the issue text.

Assessment

Domain
databases, networking, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.