How can I list all IPs relating to a single AS ?

Within this article we will show you how to list all IP`s relating to a single AS.


First of all get the IP address for the domain.

[root@server]$ whois | grep OriginAS
OriginAS:       AS32934

Finally run another whois against the AS to obtain a list of IPs.

origin=$(whois `dig +short | head -n1` | grep OriginAS | awk ' { print $2 } ') ; whois -h -- "-i origin $origin" | grep ^route

Tags: IPv4