How To Find My Public IP Address: Difference between revisions
Created page with "Use dig command for determining my public IP address: ig +short myip.opendns.com @resolver1.opendns.com Store my IP address in a shell variable with the following syntax: m..." |
No edit summary |
||
Line 1: | Line 1: | ||
Use dig command for determining my public IP address: | Use dig command for determining my public IP address: | ||
dig +short myip.opendns.com @resolver1.opendns.com | |||
Store my IP address in a shell variable with the following syntax: | Store my IP address in a shell variable with the following syntax: | ||
myip="$(dig +short myip.opendns.com @resolver1.opendns.com)" | myip="$(dig +short myip.opendns.com @resolver1.opendns.com)" | ||
echo "My WAN/Public IP address: ${myip}" | echo "My WAN/Public IP address: ${myip}" |
Latest revision as of 14:46, 24 February 2020
Use dig command for determining my public IP address:
dig +short myip.opendns.com @resolver1.opendns.com
Store my IP address in a shell variable with the following syntax:
myip="$(dig +short myip.opendns.com @resolver1.opendns.com)" echo "My WAN/Public IP address: ${myip}"