3 ms·
Not as an Apache module AFAIK but there are command line tools [1] to do the lookups and you could probably cache the results into text files named by part of t
by LinuxBender 4y ago
Not as an Apache module AFAIK but there are command line tools [1] to do the lookups and you could probably cache the results into text files named by part of the IP. There are likely rate limits.
Another more manual method would be to look IP's up in bgp.he.net [2] but there are for sure rate limits. That site can give you all the IPv6/IPv4 CIDR blocks for each AS number. This site is very handy for spotting the shady netblock resellers.
[Edit] Here is an old apache module but I have never tested it and it appears to be unsupported. [3] There may be libraries to do this in LUA/Python/Rust.
Something else that you may find useful is this route summarization script that can merge CIDR blocks into their bigger block notation. [4]
[1] - https://askubuntu.com/questions/595403/how-to-find-the-asn-of-an-ip-using-dig-command https://askubuntu.com/questions/595403/how-to-find-the-asn-o...
[2] - https://bgp.he.net/ https://bgp.he.net/
[3] - https://github.com/poeml/mod_asn https://github.com/poeml/mod_asn
[4] - https://adrianpopagh.blogspot.com/2008/03/route-summarization-script.html https://adrianpopagh.blogspot.com/2008/03/route-summarizatio...
- CommitSyn 4y agoThat's great, thank you!