Thursday, March 29, 2018

finding ip ranges via ASN

To obtain all the IP ranges of an ISP or large organization, got a procedure from this quora post -

https://www.quora.com/How-can-I-obtain-a-list-of-IP-addresses-owned-by-a-specific-company-I-would-like-to-provide-a-targeted-offer-to-site-visitors-if-they-work-at-a-certain-company-I-would-like-to-get-a-list-of-the-IP-addresses-that-this-organization-owns


https://www.peeringdb.com/net/1903 has Airtel's ASN.

Then, we can use that ASN in this whois query -

whois -h whois.radb.net -- '-i origin AS9498' | grep -Eo "([0-9.]+){4}/[0-9]+" > airtel.txt
whois -h whois.radb.net -- '-i origin AS9829' | grep -Eo "([0-9.]+){4}/[0-9]+" > bsnl.txt

No comments:

Post a Comment