ML

country

country; V 4; 2011-11-23; IP to country lookup tool

Synopsis and description

country [--database=path] [--interactive] | [[--backlog=number] [--max-conn=number] [--port=service]] | [ip-address ...]

The program converts an IP address to a two-digit country code. Locally stored database file is used. Three modes of operation are available: simple command line interface, interactive mode (reading from standard input) and listening to network connections as a daemon.

Downloading and compiling

Source code and manual pages: IP to country database: Requirements: Compiling and installing:
gcc -Wall -s -ocountry country.c -lpthread -larguments

Examples

$ country -d /var/local/country/country.db 212.177.36.1
it
$

You are connecting from: 13.58.247.31
This address looks up as:

Send me a message if it's wrong ;)