Welcome, guest | Sign In | My Account | Store | Cart

Very simple way to get external IP and geolocation uysing dig and geoiplookup.

dig is cool to obtain my external IP and I use geoiplookup 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.

It's just a tip.

Bash, 1 line
1
alias geoloc='geoiplookup $(dig +short myip.opendns.com @resolver1.opendns.com)'
Created by manu on Sun, 30 Nov 2014 (CC0)
Bash recipes (41)
manu's recipes (1)

Required Modules

  • (none specified)

Other Information and Tasks