Skip to content

IP Information Utility

anon edited this page Jun 11, 2025 · 2 revisions

ipinfo.py is a command-line tool and library to look up IP address information, such as country, ASN (Autonomous System Number), and ASO (Autonomous System Organization), using local databases. It also includes functionality to download and update these databases. The default IP geolocation databases used by this utility are sourced from the sapics/ip-location-db project on GitHub by user 'sapics' and are licensed under Creative Commons Zero (CC0). You can find the repository at https://github.com/sapics/ip-location-db.

Basic CLI usage examples:

# Update databases
bin/ipinfo.py --update

# Lookup an IP address
bin/ipinfo.py 8.8.8.8

The script can be configured via maillogsentinel.conf to specify paths for the databases, or it will use default paths if not configured.

Clone this wiki locally