View Full Version : [ubuntu] command to know location from ip?
December 15th, 2008, 08:33 PM
sometimes i want to know where is a person come from? all i know is the ip he uses. of course i can go to sites such as ip2location to get the information i want. but openning a heavy page just to know that is like a pain!
anyone could suggest a command to handle this in terminal?
December 15th, 2008, 09:04 PM
There is none that I know of. You might could build a list of regions that use certain google.com and ISP servers and crossreference that with a traceroute, but that is a lot more work than you probably want to do.
I would be interested as well if anyone has a better answer
December 15th, 2008, 09:06 PM
The utility "tracert" can give you some information about an ip address. I'm not sure this is quite what you're looking for, but you can give it a try.
sudo apt-get install traceroute
sudo tracert <ip address>
It's funny, I've used this command on Windows a bit, so I typed it in the terminal to see if Linux had something similar, and it worked (almost, the extra arguments may be different) exactly the same.
December 15th, 2008, 09:07 PM
The free edition of GeoIP (apt-get install geoip-bin) gives you the country:
firas@nobue ~ % geoiplookup 184.108.40.206
GeoIP Country Edition: FR, France
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.