Skip to content

Instantly share code, notes, and snippets.

@jintao-zero
Created June 8, 2018 11:01
Show Gist options
  • Save jintao-zero/115a7d7d811049e774055c3e72732802 to your computer and use it in GitHub Desktop.
Save jintao-zero/115a7d7d811049e774055c3e72732802 to your computer and use it in GitHub Desktop.
dig +short myip.opendns.com @resolver1.opendns.com
alias wanip='dig +short myip.opendns.com @resolver1.opendns.com'
https://unix.stackexchange.com/questions/22615/how-can-i-get-my-external-ip-address-in-a-shell-script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment