Giter Club home page Giter Club logo

ip-index's Introduction

IP Index

An offline IP lookup database of VPN CIDRs and bad actor IP ranges. Updated daily.

Project contains:

  • An SQLite3 database containing IP ranges of datacenters, IPs used for malicious activities, ASNs and countries
  • Same plain-text files are available under /dist folder.

Why this exists

Existing solutions to detect VPNs/Proxies revolve around providing HTTP APIs or binary databases on a subscription model. Downsides of the existing projects are:

  • Extremely expensive
  • Not portable
  • Not fast enough

This database is:

  • Free
  • Portable (SQLite3)
  • Sufficiently fast

What's missing?

Some ISPs/Telecoms, while not being exactly hosting providers, might still provide mobile VPN services on specific IP addresses, which is not easy to detect. These are often covered in paid solutions.

Using black-listed IPs lists together with datacenter IP lists covers some of the bases, as those IPs are often used for malicious purposes and end up blacklisted eventually.

How are/were the datacenter ranges detected

  • The ASNs (manually) deducted from this list of Datacenters
  • The ASNs from these lists were added
  • The ASNs deducted (automatically, during build) from NordVPN's server list IPs
  • List of all ASNs names is matched against keywords that would give away datacenters or hosting

False positives are possible.

Items in database

Below is the approximate number of rows in each of the database tables. Each row contains IP or IP range in an integer notation (first and last IPs).

Table Items Info
datacenters ~138k IP ranges
blacklisted ~1.9M mostly IPs, with occasional IP ranges
asns ~1.1M ANSs with related IP ranges
countries 268k IP ranges

Sanity check

Pick some random IPs:

sort -R dist/datacenters.netset | head -n 5

Check against any of the known IP scoring services:

Usage

The project is provided with an example NodeJS library to query the database, but you are not limited to the programming language, since SQLite database is highly portable.

Run the example file:

node ./src/example.js

Output:

init: 46.245ms
Datacenter: false
Blacklisted: true
Country: de
Is EU: true
Asn: { id: 3320, name: 'Deutsche Telekom AG' }
queries: 21.886ms

Building

In case you really want to build the project yourself, you would need a NodeJS/NPM environment.

Install dependencies:

npm run deps:install

Start the build process, which would take up to a minute to complete.

TOKEN={IP2LOCATION_DOWNLOAD_TOKEN} npm run db:build

The TOKEN for the underlying ASN database could be issued with your free ip2location account.

Used projects

Acknowledgments

ip-index's People

Contributors

actions-user avatar dependabot[bot] avatar umkus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.