An Apache module to look up routing data
mod_asn is highly scalable. To do lookups in high-speed, it uses the PostgreSQL ip4r datatype that is indexable with a Patricia Trie algorithm to store network prefixes. This is the only suitable algorithm for searching through the ~250.000 existing IPv4 prefixes in a breeze.
mod_asn is usable as standalone module, and the lookup result can be used by scripts or other Apache modules. For instance, a download redirector could base its decisions on the lookup result provided by mod_asn.
The source code is available under the terms of the Apache License, Version 2.0.
It is available as sources in the openSUSE build service (requires an openSUSE build service account) and as RPM and Debian package. You can browse (or check out) the source code from the svn repository (viewvc link).