mod_asn is an Apache module that uses BGP routing data to look up the autonomous system (AS) and the network prefix (subnet) which contains a given (clients) IP address. WWW: http://mirrorbrain.org/mod_asn/