Performing IP address geolocation
Identifying the location of an IP address may help system administrators identify the origin of a network connection. Nmap ships with several NSE scripts that help us perform geolocation of a remote IP address: ip-geolocation-maxmind
, ip-geolocation-ipinfodb
, and ip-geolocation-geoplugin
.
This recipe will show you how to set up and use the geolocation scripts included with Nmap NSE.
Getting ready
The ip-geolocation-maxmind
script depends on a database that is not included in Nmap by default. Download Maxmind's GeoLite City database in binary format from http://dev.maxmind.com/geoip/legacy/geolite/Â and place it in your local Nmap data
folder (/nselib/data/
)Â inside your installation directory.
The ip-geolocation-ipinfodb
script requires an API key to query an external service. The service is free, and you only need to register at http://ipinfodb.com/register.php to get one. This service does not limit the number of queries, but connections are only processed from...