Doing geolocation lookups in command line

Did you know that it’s possible to do your own geoip lookups from the linux command line?

You need to install the geoip-bin package in Ubuntu/Debian’s APT system:

sudo apt-get install geoip-bin

Then after which, lookups can be done as simply as:

$ geoiplookup
GeoIP Country Edition: US, United States

Note that the lookups are based on the GeoLite Country database.  For more detailed geoip lookups you will need to buy the better databases.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s