Popular recipes by manu http://code.activestate.com/recipes/users/4191225/2014-11-30T00:46:28-08:00ActiveState Code RecipesGet external IP & geolocation in bash. (Bash)
2014-11-30T00:46:28-08:00manuhttp://code.activestate.com/recipes/users/4191225/http://code.activestate.com/recipes/578972-get-external-ip-geolocation-in-bash/
<p style="color: grey">
Bash
recipe 578972
by <a href="/recipes/users/4191225/">manu</a>
(<a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/geocoding/">geocoding</a>, <a href="/recipes/tags/geolocation/">geolocation</a>).
Revision 2.
</p>
<p>Very simple way to get external IP and geolocation uysing dig and geoiplookup.</p>
<p><code>dig</code> is cool to obtain my external IP and I use <code>geoiplookup</code> to convert IP to location. You need geoip-bin and, geoip-database (and/or geoip-database-contrib and geoip-database-extra). In Debian, database seems update monthly.</p>
<p>It's just a tip.</p>