Skip to content

Instantly share code, notes, and snippets.

@maskati
Created September 21, 2023 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save maskati/adbc00cec849f30ac65ebdaafc1e48ce to your computer and use it in GitHub Desktop.
Save maskati/adbc00cec849f30ac65ebdaafc1e48ce to your computer and use it in GitHub Desktop.
Get my IP address using DNS

Windows

nslookup myip.opendns.com resolver1.opendns.com

Linux

dig +short myip.opendns.com @resolver1.opendns.com

PowerShell

resolve-dnsname -name myip.opendns.com -server resolver1.opendns.com | select -exp ipaddress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment