Simple IP Information / IP to Location (Country) Lookup

IP Facts

A colleague of mine recently released a new website, which I thought was brilliant enough to blog about. Simply, the website displays IP Facts, without all the crap and ads we normally have to put up with. Simply put sysadmins, it’s simple and gets straight to the point – something hard to come across.

With a little assistance, we also got it to lookup the details of a supplied IP address, which I find helpful when checking abusive IP addresses.

Get your IP Facts – http://ipfacts.info/

Linux / SSH Console Commands

Of course if you have a console window open, you can typically get most of this information using a few commands.

Find your server’s interface IP address:

ifconfig

Check what an IP address resolves to:

host iphere
host 122.122.122.122

Check what hostname an IP address resolves to:

host domain.com
host google.com

As for what country an IP belongs to, this isn’t as easy. You can run a whois and see who the IP is owned by, but that isn’t always the correct country for international corporations, but even then that’s no promise you’ll get any information if any:

$ whois 122.122.122.122
[Querying whois.apnic.net]
[Redirected to whois.twnic.net]
[Querying whois.twnic.net]
[whois.twnic.net]
Chunghwa Telecom Data Communication Business Group

Netname: HINET-NET
Netblock: 122.122.0.0/16

Administrator contact:
network-adm@hinet.net

Technical contact:
network-adm@hinet.net

In the case of the above, the IP to Country script comes in handy because the database is build from another source.

Similar Posts:

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: -1 (from 1 vote)
Tags: , , , .

One Response to Simple IP Information / IP to Location (Country) Lookup

What are your thoughts?