Like us on Facebook!

Saturday, 13 April 2013

handy line to lookup country using IP address/hostname





Here is a handy lookup tool for all admins out there ... You can use both IP and FQDN (fully qualified domain name). Use of this tool is when you have a few servers scattered all over the globe and you want to know where it is attached ...




geoiplookup(1) - Linux man page


Name

geoiplookup - look up country using IP Address or hostname

Synopsis

geoiplookup [-d directory] [-f filename] [-v] <ipaddress|hostname>

Description

geoiplookup uses the GeoIP library and database to find the Country that an IP address or hostname originates from.
For example
geoiplookup 80.60.233.195
will find the Country that 80.60.233.195 originates from, in the following format:
NL, Netherlands

Options

-fSpecify a custom path to a single GeoIP datafile.
-d
Specify a custom directory containing GeoIP datafile(s). By default geoiplookup looks in /usr/share/GeoIP
-v
Lists the date and build number for the GeoIP datafile(s).

Author

Written by T.J. Mather

No comments:

Post a Comment

Have your say!