-
-
Save lauer/c1f0d7932ae7c23cfc5a113317707bc6 to your computer and use it in GitHub Desktop.
Fast way to get External and Internal ip addresses
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 | |
echo "External: " | |
dig +short myip.opendns.com @resolver1.opendns.com | |
echo "Internal: " | |
ifconfig |grep inet | awk '{print $2}' |grep -v '127.0.0.1\|::1\|fe80::' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment