Skip to content

Instantly share code, notes, and snippets.

@gnepud
Last active March 22, 2016 09:25
Show Gist options
  • Select an option

  • Save gnepud/f6b9707efe588d94d741 to your computer and use it in GitHub Desktop.

Select an option

Save gnepud/f6b9707efe588d94d741 to your computer and use it in GitHub Desktop.
Get External IP / local IPs
# Get External IP / local IPs
alias ip="curl ipinfo.io/ip"
alias ips="ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1'"
## other get external ip methods
# dig +short myip.opendns.com @resolver1.opendns.com
# curl echoip.com
# curl ifconfig.me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment