networking:asn_autonomous_system_number
This is an old revision of the document!
Table of Contents
Networking - ASN (Autonomous System Number)
An ASN (Autonomous System Number) refers to a block of IP addresses.
Most large organizations or ISPs are allocated a number of ASNs.
ASNs can be useful to block an entire organization. Instead of manually having to add hundreds of IP addresses into a firewall rule, you can simply block the entire ASN, which blocks all IPs within that ASN.
How to find a specific ASN
There are many search tools online such as https://www.ultratools.com/tools/asnInfo.
For example, searching for Google returns a number of ASNs.
Determine which IPs actually fall into an ASN
Taking AS41264 from the above search as an example:
whois -h whois.radb.net -- '-i origin AS41264' | grep ^route | grep -v route6 | cut -d" " -f7 | most
returns:
74.125.63.0/24 74.125.58.0/24 74.125.60.0/24 104.132.0.0/16 104.132.0.0/23 104.132.2.0/23 104.132.4.0/23 104.132.6.0/23 104.132.8.0/23 104.132.10.0/23 ...
NOTE: The IP addresses within an ASN may change often, so if you do use this for firewalling then update the list regularly.
References
networking/asn_autonomous_system_number.1609775157.txt.gz · Last modified: 2021/01/04 15:45 by peter