Created
January 23, 2020 19:08
-
-
Save ccondry/3f55e345aa37b23a41acee6405cabda9 to your computer and use it in GitHub Desktop.
get public IP
This file contains hidden or 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
#!/bin/sh | |
dig +short myip.opendns.com @resolver1.opendns.com | |
# or use the following: | |
# dig TXT +short o-o.myaddr.l.google.com @ns1.google.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this gets the NAT public IP for a linux computer