JP Vossen on 13 Mar 2014 22:09:05 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] GeoIP from the CLI


Lots of great tips in this blog, like: http://xmodulo.com/2014/03/geographic-location-ip-address-command-line.html

Method 1:
$ sudo apt-get install geoip-bin

### The default installation of geoiplookup comes with GeoIP.dat database file which is located in /usr/share/GeoIP. With this database, you can look up the country information only.
$ geoiplookup 23.66.166.151

Method 2:
$ curl ipinfo.io/23.66.166.151


Related, with no argument you get your external IP! http://xmodulo.com/2013/04/how-to-find-the-public-ip-address-from-command-line.html

(Paul, these would fit well into your CLI slides.)

Enjoy,
JP
----------------------------|:::======|-------------------------------
JP Vossen, CISSP            |:::======|      http://bashcookbook.com/
My Account, My Opinions     |=========|      http://www.jpsdomain.org/
----------------------------|=========|-------------------------------
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug