Skip to content

Instantly share code, notes, and snippets.

@anemology
Created October 19, 2025 03:30
Show Gist options
  • Save anemology/b05015cbd3225a187a51f33205ef7c03 to your computer and use it in GitHub Desktop.
Save anemology/b05015cbd3225a187a51f33205ef7c03 to your computer and use it in GitHub Desktop.
Get Public IP

Get Public IP

DNS

Google

dig +short TXT o-o.myaddr.l.google.com @ns1.google.com

nslookup -type=TXT o-o.myaddr.l.google.com ns1.google.com

Cloudflare

dig +short TXT CH whoami.cloudflare @1.1.1.1

nslookup -type=TXT -class=CHAOS whoami.cloudflare 1.1.1.1

Akamai

dig +short whoami.akamai.net @ns1-1.akamaitech.net

nslookup whoami.akamai.net ns1-1.akamaitech.net

OpenDNS

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

nslookup myip.opendns.com resolver1.opendns.com

HTTP

curl ip.me
curl ip.sb

curl ipinfo.io
curl ifconfig.co
curl icanhazip.com
curl ifconfig.me
curl checkip.dyndns.org

curl https://1.1.1.1/cdn-cgi/trace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment