Skip to content

Instantly share code, notes, and snippets.

@c0mpiler
Created September 17, 2016 23:12
Show Gist options
  • Save c0mpiler/9ecc94c5fbcdbfe45aaf439ec30a3034 to your computer and use it in GitHub Desktop.
Save c0mpiler/9ecc94c5fbcdbfe45aaf439ec30a3034 to your computer and use it in GitHub Desktop.
printf "\nlocal: " ; ifconfig | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}'
myip=$(curl -s ipecho.net/plain)
printf "public: $myip " ; echo ; echo
geoiplookup $myip ; echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment