Created
July 15, 2017 13:17
-
-
Save svmt/af50c54d27896ad9e7cb6d51c86cf7da to your computer and use it in GitHub Desktop.
WAN IP from Bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using dig with OpenDNS as resolver: | |
dig +short myip.opendns.com @resolver1.opendns.com | |
Perhaps alias it in your bashrc so it's easy to remember | |
alias wanip='dig +short myip.opendns.com @resolver1.opendns.com' | |
Responds with a plain ip address: | |
$ wanip | |
80.100.192.168 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment