Skip to content

Instantly share code, notes, and snippets.

@promolic1
Forked from maskati/#my-ip-dns.md
Created December 8, 2023 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save promolic1/d703180ec292358bdfb1f1022318b1b0 to your computer and use it in GitHub Desktop.
Save promolic1/d703180ec292358bdfb1f1022318b1b0 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