IPNetDB

The downloadable, embeddable internet network information database

IPNetDB is a downloadable database containing information on IP addresses and the internet in the mmdb format. The database is split into two files, one database of prefix information that can be queried by IP address and the other to look up networks by autonomous systems number.
IPNetDB databases are small enough to be deployed inside applications to provide advanced routing information to applications, such as identifying traffic from a particular network and providing additional information on client IP addresses.
The databases are updated weekly on Sunday and were last generated on the 5th of December 2021.
By downloading or using IPNetDB databases you agree to our licence. You can automate deployments by downloading the databases every Monday using the JSON-encoded latest file list. The data contained in IPNetDB databases is as correct as we can make it but some information may not be perfectly accurate. Use in your application is at your own risk.

What's in the database?

The IPNetDB prefix database contains the following information. The database is queried by IP address.
Field Example Description
allocation 8.0.0.0/9 CIDR allocated by the registry that contains the IP address
allocation_cc US Two letter country code recorded at the registry for the allocation
allocation_registry arin Registry that has allocated the allocation
allocation_status allocated Allocation status at the registry
as 15169 ASN of the IP address, if multiple origins one is selected
as_cc US Two letter country code recorded at the registry for the ASN
as_entity Google LLC Name of the entity recorded as owning the ASN at the registry
as_name GOOGLE ASN name recorded at the registry
as_private False True if the ASN is not in a registry allocation and is a private ASN
as_registry arin Registry that has allocated the ASN
prefix 8.8.8.0/24 CIDR advertised the public routing table that contains the IP address
prefix_asset [] An array or list of ASNs if the prefix is advertised in an AS set
prefix_assignment allocation Prefix assignment status at the registry
prefix_bogon False True if the prefix is not in a registry allocation and is a bogon
prefix_entity Google LLC Name of the entity recorded as owning the prefix at the registry
prefix_name LVLT-GOGL-8-8-8 Prefix name recorded at the registry
prefix_origins [15169] An array or list of all ASNs that have advertised the prefix
prefix_registry arin Registry that has allocated the prefix
The IPNetDB ASN database contains the following information. The database is queried by autonomous systems number.
Field Example Description
as 58682 AS number
cc BD Two letter country code recorded at the registry for the ASN
entity Level3 Carrier Ltd. Name of the entity recorded as owning the ASN at the registry
in_use True True if the ASN advertises routes or has peers
ipv4_prefixes ['103.15.40.0/24', '103.15.41.0/24'] Array or list of IPv4 prefixes the ASN advertises
ipv6_prefixes ['2404:c900:4::/48', '2404:c900:5::/48'] Array or list of IPv6 prefixes the ASN advertises
name LEVEL3-BD ASN name recorded at the registry
peers [6939, 137409, 2914] Array or list of ASNs this ASN has peering with
private False True if the ASN is not in a registry allocation and is a private ASN
registry arin Registry that has allocated the ASN
status allocated Allocation status at the registry

Usage

The mmdb file format, short for MaxMind Data Base, used by IPNetDB is compatible with all existing libraries that can read mmdb files. Any language or server that is uses libmaxminddb can read IPNetDB databases. Usage examples:

Python IP lookup for 8.8.8.8

$ pip install maxminddb
$ python
Python 3.9.5
Type "help", "copyright", "credits" or "license" for more information.
>>> import maxminddb, pprint
>>> reader = maxminddb.open_database('ipnetdb_prefix_latest.mmdb')
>>> data = reader.get('8.8.8.8')
>>> pprint.pprint(data)
{'allocation': '8.0.0.0/9',
'allocation_cc': 'US',
'allocation_registry': 'arin',
'allocation_status': 'allocated',
'as': 15169,
'as_cc': 'US',
'as_entity': 'Google LLC',
'as_name': 'GOOGLE',
'as_private': False,
'as_registry': 'arin',
'prefix': '8.8.8.0/24',
'prefix_asset': [1234,
                 5678],
'prefix_assignment': 'allocation',
'prefix_bogon': False,
'prefix_entity': 'Google LLC',
'prefix_name': 'LVLT-GOGL-8-8-8',
'prefix_origins': [15169],
'prefix_registry': 'arin'}

Python ASN lookup for AS58682

Some maxxminddb libraries, like the Python bindings, require the query to be in the format of an IP address. You can convert your ASN from a 32bit integer into a dotted quad format first if this is required as in the example below.

$ pip install maxminddb
$ python
Python 3.9.5
Type "help", "copyright", "credits" or "license" for more information.
>>> import maxminddb, pprint, ipaddress
>>> reader = maxminddb.open_database('ipnetdb_asn_latest.mmdb')
>>> asn_in_ip_format = ipaddress.ip_address(58682)
>>> data = reader.get(asn_in_ip_format)
>>> pprint.pprint(data)
{'as': 58682,
'cc': 'BD',
'entity': 'Level3 Carrier Ltd.',
'in_use': True,
'ipv4_prefixes': ['103.15.40.0/24',
                  '103.15.41.0/24',
                  '103.15.42.0/24',
                  '103.15.43.0/24',
                  '103.124.226.0/24',
                  '103.124.225.0/24',
                  '103.124.227.0/24',
                  '43.228.208.0/24',
                  '43.228.209.0/24'],
'ipv6_prefixes': ['2404:c900:4::/48',
                  '2404:c900:5::/48',
                  '2404:c900:a::/48',
                  '2404:c900:1::/48',
                  '2404:c900:3::/48',
                  '2404:c900:6::/48',
                  '2404:c900:8::/48',
                  '2404:c900:9::/48',
                  '2404:c900:b::/48'],
'name': 'LEVEL3-BD',
'peers': [6939,
          137409,
          2914,
          1828,
          199524,
          58952,
          9498,
          58682,
          174,
          6453,
          18106,
          133210,
          14907],
'private': False,
'registry': 'apnic',
'status': 'allocated'}
Note that IPNetDB is not a IP to geolocation tool. The country codes returned are from the IANA allocation information and are not accurate for use in geolocation. Country codes are accurate to determine the country that an IP address or ASN was originally allocated to, but not a specific location.
The format stored in IPNetDB databases is different to that stored by other mmdb databases so remember you will need to use the libmaxminddb based libraries directly and not any GeoIP libraries.
Language Package
Python maxminddb
PHP maxmind-db/reader
Ruby maxmind-db
Java com.maxmind.db:maxmind-db
Node maxmind
The above table is not exhaustive, native libmaxminddb implementations exist for many additional languages. The mmdb format as well as all of the maxmind libraries are developed by MaxMind. MaxMind and GeoIP are registered trademarks of MaxMind, Inc. IPNetDB does not use any existing MaxMind data and the databases are generated using the open source MaxMind database creation libraries.

Licencing

Free for open source use

You can use IPNetDB databases freely in:
  • Open source projects which are also non-commercial
An attribution to IPNetDB is appreciated but not a requirement.

Attribution for non-commercial use

You can use IPNetDB databases freely in:
  • Non-commercial projects
  • Closed source projects with no commercial interest
  • Projects where IPNetDB does not increase the monetary value of the project
However you must include an attribution to IPNetDB or https://ipnetdb.com/ where appropriate, for example in your projects distributed documentation or footer of a website.

Paid for commercial use

You must pay for IPNetDB databases in:
  • Commercial projects
  • Internal projects for commercial entities
  • Closed source projects with commercial interest
  • Projects where IPNetDB increases the monetary value of the project

A commercial IPNetDB licence is available for a flat fee of $25 USD per month, payable in advance as a $300 USD payment per year. Please contact us at [email protected] for a licence. You do not require a paid licence for commercial software in active development. You do require a licence for use by commercial entities once it is in production use. An attribution to IPNetDB is appreciated but not a requirement.

[email protected]
Please note that you are not permitted to redistribute the mmdb files without including attribution and a link to https://ipnetdb.com/ along with a copy of the 3 licence options above.

Historical releases

Up to one year of past weekly releases are available on our CDN. These are:
Date Release File
2021-12-05 prefix ipnetdb_prefix_2021-12-05.mmdb
SHA256:9e62cd34cc17e252b5dcff837a3dfa94a1a793b8360df42b8e7553a7e7854d22
2021-12-05 asn ipnetdb_asn_2021-12-05.mmdb
SHA256:37eb7b1bfa99c605779b839e442c55ce6112d932c6cf940849a0203470d487a4
2021-11-28 prefix ipnetdb_prefix_2021-11-28.mmdb
SHA256:31bb47ad5cc5c9faf36d22739c39e4a114018260f856fcc0ddb7b03c16caf612
2021-11-28 asn ipnetdb_asn_2021-11-28.mmdb
SHA256:f1177aba6220e61cdee9df996ec19e3b13459c5bd13cc8b76f76d37fcc1c543e
2021-11-21 prefix ipnetdb_prefix_2021-11-21.mmdb
SHA256:5eaafce5ba5d320031faad4de5b01e88e45438a4a560d660dde961c5765f1d04
2021-11-21 asn ipnetdb_asn_2021-11-21.mmdb
SHA256:2813fde16d826065d3d0b4d9cbf7d239ac5a152ce8d08270bc7bfed4e26f3688
2021-11-14 prefix ipnetdb_prefix_2021-11-14.mmdb
SHA256:1238b7bf2a8ae9c155d391f2f867c94ec0b7170c64c692ea6cd64afb3f5181f0
2021-11-14 asn ipnetdb_asn_2021-11-14.mmdb
SHA256:3d0c40ce64850ae5246144deb54dd2c06dd593ae0612a75304914b8a739c03d0

Common questions

Where does the data in IPNetDB come from?

Allocation data for IP addresses and ASNs are obtained from the IANA. Internet routing information is obtained from live route views from multiple globally diverse sources. Entity and extended information is obtained from WHOIS or RDAP sources for each regional registry. This information is combined into a single, large tree and then flattened into the generated IPNetDB databases. All information used to generate the IPNetDB databases is from public sources.

How accurate is the data?

The IANA allocation information as well as the prefix and ASN information is accurate as of when database was last generated. As the databases are generated weekly these files may be a few days out of date. The entity and extended information take several weeks to fully update so some entries may be out of date if there have been any changes to the ownership of prefixes or ASNs. The data can be used for most applications but do not use IPNetDB data for mission-critical or in systems that require absolute accuracy. Use of IPNetDB databases and data is entirely at your own risk.

How frequently are the databases updated?

The allocation and routing information is updated weekly. The entity information is updated slowly, but constantly. The generated database exports are published weekly on Sundays.

Can update the databases automatically?

Yes, you can download the latest version of the databases each week. You can automate deployments by downloading the databases every Monday using the JSON-encoded latest file list.

Can I use IPNetDB with [language or framework]?

Almost certainly, but that is out of the scope of what we would assist with. You can search for "MaxMind database" support in any language, framework or server of your choice.

Can I query a prefix and not an IP?

You can just query the first IP in the prefix which will accomplish the same lookup. For example for 8.8.8.0/24 you can just query 8.8.8.0 in the prefix database.

What does a commercial licence pay for?

The data contained in the IPNetDB databases is freely available in various formats to anyone. Your commercial licence to IPNetDB pays for the significant data processing required (hundreds of millions of routes, for example), compression of the data and then hosting and ongoing maintenance. Your licence is for the service that processes the data and construction of the reliable database, not to the data itself.

Who makes IPNetDB?

IPNetDB is operated and run by Kovalent Systems, an Australian based software development and advisory company.