Get your public IP using DNS
https://docs.google.com/spreadsheets/d/1lkNJ0uQwbeC1ZTRrxdtuPLCIl7mlUreoKfSIgajnSyY/htmlview
DNS | IPSome Open DNS operators provide a way to return the IP address of the request packet.
Google DNS:
dig o-o.myaddr.l.google.com txt @ns1.google.com +short
OpenDNS:
dig myip.opendns.com @resolver1.opendns.com +short
Akamai:
$ dig +short TXT whoami.ds.akahelp.net
"ns" "2001:db8::abcd"
"ecs" "203.0.113.0/24/0"
"ip" "203.0.113.132"
The ds
stands for dual stack. It is also reachable under whoami.ipv6.akahelp.net
to force IPv6 or whoami.ipv4.akahelp.net
to force IPv4.
ns
stands for the unicast IP address of the recursive resolver. ecs
contains the EDNS client subnet information, if the option is used by the resolver. In this case ip
contains a representative IP within the ECS, not necessarily the IP of the client.
The new version is introduced in this blog post https://www.akamai.com/blog/developers/introducing-new-whoami-tool-dns-resolver-information.
The old version might be decomissioned:
dig whoami.akamai.net. @ns1-1.akamaitech.net. +short