List of Hosting ASNs

Does anyone have a pretty comprehensive list of hosting provider ASNs?

I am working on a project to replace black box proxy block and was hoping to redo it using ASNs.

Thanks in advance :slight_smile:

for n in `seq 1 99999`; do whois -I $n > ASN"$n".txt; done

But would the whois info contain that they are a hosting provider?

Also no -I flag

whois: invalid option -- 'I'
Usage: whois [OPTION]... OBJECT...

-h HOST, --host HOST   connect to server HOST
-p PORT, --port PORT   connect to PORT
-H                     hide legal disclaimers
      --verbose        explain what is being done
      --help           display this help and exit
      --version        output version information and exit

These flags are supported by and some RIPE-like servers:
-l                     find the one level less specific match
-L                     find all levels less specific matches
-m                     find all one level more specific matches
-M                     find all levels of more specific matches
-c                     find the smallest match containing a mnt-irt attribute
-x                     exact match
-b                     return brief IP address ranges with abuse contact
-B                     turn off object filtering (show email addresses)
-G                     turn off grouping of associated objects
-d                     return DNS reverse delegation objects too
-i ATTR[,ATTR]...      do an inverse look-up for specified ATTRibutes
-T TYPE[,TYPE]...      only look for objects of TYPE
-K                     only primary keys are returned
-r                     turn off recursive look-ups for contact information
-R                     force to show local copy of the domain object even
                       if it contains referral
-a                     also search all the mirrored databases
-s SOURCE[,SOURCE]...  search the database mirrored from SOURCE
-g SOURCE:FIRST-LAST   find updates from SOURCE from serial FIRST to LAST
-t TYPE                request template for object of TYPE
-v TYPE                request verbose template for object of TYPE
-q [version|sources|types]  query specified server info

$ whois --version
Version 5.5.2.

Report bugs to [email protected].

-I query and follow its referral

It wouldn’t look up the providers specifically, but you could collate that data to create your own map.

1 Like

But what would you use to collate the data belonging to a hosting provider?

whois --version
Version 5.3.0.

Personally, I’d just regex the IANA data and dump it into a DB, then look from there.

The ASNs aren’t always useful, though - not everyone handles their own routing, and with leased IP space (Often from @Francisco and others), you almost need to ask or check their known looking glasses for IP space more than via AS.

Just my own personal observation.

I was just looking at Colocrossing’s and I didn’t see anything that would indicate it was hosting. Which is why I was curious on how you might approach it.

Oh. I see.

You’d almost have to parse through it and rectify manually. Again, searching by AS isn’t as cut and dry as it was in the 90s. You could easily ignore all residential space, but you almost need a target to look for, and then to parse through from the known data.

It’s a big task to undertake. I’m cheap, and lazy, so I tend to just look up the Looking Glass IPs from hosts I’m interested in, and then track that back, and make a note.

1 Like


I was hoping to find a way to automate it… Don’t want to look through 340k ASNs to figure out which is which.

1 Like

Unless they advertise their AS, it’s not really straight forward any more than GeoIP, which is also fraught with error.

Good luck!

Exactly, which is why I was asking for a list.


*points to initial response*


I just want to know which ones are hosting providers :(((((((

Unless there is a way for me to filter out which ones are hosting providers or not I will have to manually review each entry.

340,000 entries, devided by 60 and 24 assuming I can do one a minute would be 236 days of research. It just isn’t possible.


$7 dollars?

1 Like

Maybe this?



take a look at this - API Responses -

Good idea, but expensive as FUCK!

1 Like

There are companies that specialise in curating that kind of data set, Max mind for example, maybe reach out to them and see if you can buy it.

1 Like