Giter Site home page Giter Site logo

asn-ip's Introduction

ipverse-asn-ip

IPv4 and IPv6 networks in CIDR notation (e.g. 100.2.30.0/22) organized by announcing autonomous systems (AS). All networks are aggregated to save space. The data is available in both TXT plaintext and JSON format.

This is a IPv4 TXT plaintext example for AS1234:

# AS1234 (FORTUM)
# Fortum
#
132.171.0.0/16
137.96.0.0/16
193.110.32.0/21

And this is a JSON example for the same AS (JSON format includes both, IPv4 and IPv6):

{
  "asn": 1234,
  "handle": "FORTUM",
  "description": "Fortum",
  "subnets": {
    "ipv4": [
      "132.171.0.0/16",
      "137.96.0.0/16",
      "193.110.32.0/21"
    ],
    "ipv6": [
      "2405:1800::/32"
    ]
  }
}

This repository is updated daily by pulling all route prefix announcements from the BGP routing table and merging it with a list of known autonomous systems.

For the list of autonomous systems with their AS number (ASN) and description see ipverse-asn-info

Update notes

  • 2023-9-3: The airheads at McAfee decided to insert an entire PEM certificate in the description field. The description field is now trimmed to a reasonable size.

Use cases

  • Firewalling, e.g. to ban all IP addresses from that notorious, Spam-friendly network provider
  • Route advertisment check, see if/how the routes of a specific autonomous system are seen (even over time, thanks to Git's changelog)
  • Statistical analysis purposes, e.g. the number of public IPv4 addresses currently announced vs unused/unassigned
  • OSINT/CTI Cyber Threat Intelligence

How to use

To download the announced networks for a specific autonomous system (AS1234 IPv4 adresses in this example), try:
$ curl https://raw.githubusercontent.com/ipverse/asn-ip/master/as/1234/ipv4-aggregated.txt

The same for all IPv6 networks from AS1234:
$ curl https://raw.githubusercontent.com/ipverse/asn-ip/master/as/1234/ipv6-aggregated.txt

The data (IPv4 + IPv6 combined) is available in JSON format as well:
$ curl https://raw.githubusercontent.com/ipverse/asn-ip/master/as/1234/aggregated.json

To download the latest autonomous system list which is used enhance the generated route data:
$ curl -O https://raw.githubusercontent.com/ipverse/asn-info/master/as.csv

See ipverse-asn-info for more information on as.csv

If you plan to use the routing data for firewalling purposes, have a look at:

Yeah, but how do I get the ASN for an IP address?

Check out this excellent blog post: https://blog.jiayu.co/2018/10/quick-url-to-asn-lookups/

asn-ip's People

Contributors

trick77 avatar

Stargazers

 avatar

Watchers

 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.