mod_asn - Look up the AS and network prefix of IP address

Distribution: CentOS 6
Repository: Psychotic Ninja x86_64
Package name: mod_asn
Package version: 1.6
Package release: 1.el6.psychotic
Package architecture: x86_64
Package type: rpm
Installed size: 85.94 KB
Download size: 37.89 KB
Official Mirror:
mod_asn is an Apache module doing lookups of the autonomous system (AS)[1], and the network prefix[2] which contains a given (clients) IP address. It is written with scalability in mind. To do high-speed lookups, it uses the PostgreSQL ip4r datatype[3] that is indexable with a Patricia Trie[4] algorithm to store network prefixes. This is the only algorithm that can search through the ~250.000 existing prefixes in a breeze. It comes with script to create such a database (and keep it up to date) with snapshots from global routing data - from a router's "view of the world", so to speak. Apache-internally, the module sets the looked up data as env table variables, for perusal by other Apache modules. In addition, it can send it as response headers to the client. It is published under the Apache License, Version 2.0. Source code can be obtained from resp. Links: [1] [2] [3] [4] Author: Peter Poeml



  • mod_asn = 1.6-1.el6.psychotic
  • mod_asn(x86-64) = 1.6-1.el6.psychotic

    Install Howto

    1. Download the latest psychotic-release rpm from
    2. Install psychotic-release rpm:
      # rpm -Uvh psychotic-release*rpm
    3. Install mod_asn rpm package:
      # yum --enablerepo=psychotic install mod_asn


    • /etc/httpd/conf.d/mod_asn.conf
    • /usr/bin/asn_get_routeviews
    • /usr/bin/asn_import
    • /usr/lib64/httpd/modules/
    • /usr/share/doc/mod_asn-1.6/CHANGES
    • /usr/share/doc/mod_asn-1.6/INSTALL
    • /usr/share/doc/mod_asn-1.6/README
    • /usr/share/doc/mod_asn-1.6/asn.sql
    • /usr/share/doc/mod_asn-1.6/mod_asn.conf
    • /usr/share/doc/mod_asn-1.6/docs/Makefile
    • /usr/share/doc/mod_asn-1.6/docs/changes.rst
    • /usr/share/doc/mod_asn-1.6/docs/
    • /usr/share/doc/mod_asn-1.6/docs/glossary.rst
    • /usr/share/doc/mod_asn-1.6/docs/index.rst
    • /usr/share/doc/mod_asn-1.6/docs/installation.rst
    • /usr/share/doc/mod_asn-1.6/docs/intro.rst
    • /usr/share/doc/mod_asn-1.6/docs/license.rst
    • /usr/share/doc/mod_asn-1.6/docs/upgrading.rst
    • /usr/share/doc/mod_asn-1.6/docs/_templates/


    2015-01-28 - Psychotic Build System <> - 1.6-1 - Initial build for Psychotic Ninja