News for hackers. Stuff that matters.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by dfc on Monday July 31, 2023 @07:25PM (#36950264)
Slightly related: There used to be a DNS server that you could query a TXT record and the response would include the IP of the server that submitted the query. You could use it to debug DNS issues. I thought it was from DNS-OARC but I can't find it anywhere. Does anyone know a way to accomplish this?
Re:Icanhazip: A simple IP address tool survived a deluge of ... by erinnh on Monday July 31, 2023 @07:40PM (#36950421)
I don’t know of a server that does exactly what you wrote, but I generally troubleshoot dns issues with a few dig commands. dig without any parameters will resolve via your normal dns server and display the servers ip.

With @(dns server ip here) you can query a different dns server to check what their answer is.

With +trace you can go through the complete dns chain from the root servers on to check for issues in the chain.

Sorry if this doesn’t help you or you knew this already.

Re:Icanhazip: A simple IP address tool survived a deluge of ... by gavinsyancey on Monday July 31, 2023 @07:44PM (#36950461)
dig +short TXT o-o.myaddr.l.google.com @ns1.google.com
Re:Icanhazip: A simple IP address tool survived a deluge of ... by p1mrx on Monday July 31, 2023 @07:57PM (#36950571)
This is what it looks like when a debug interface escapes captivity.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by dfc on Monday July 31, 2023 @09:21PM (#36951158)
This works! Thank you very much.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by thenickdude on Monday July 31, 2023 @07:52PM (#36950521)
I believe you're thinking of OpenDNS:

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

Re:Icanhazip: A simple IP address tool survived a deluge of ... by jtokoph on Monday July 31, 2023 @08:52PM (#36950974)
And the v6 version: dig -6 +short myip.opendns.com @resolver1.opendns.com aaaa
Re:Icanhazip: A simple IP address tool survived a deluge of ... by dfc on Monday July 31, 2023 @09:20PM (#36951155)
This only seems to work if your client can send requests directly to resolver1.opendns.com. It does not work if you have a server that is intercepting DNS or if you use the system configured DNS. The google version posted below is closer to what I was looking for:

    $ dig +short TXT o-o.myaddr.l.google.com @ns1.google.com
    "A.B.C.D"
    $ dig +short TXT o-o.myaddr.l.google.com
    "172.253.195.202"
    "edns0-client-subnet A.B.C.0/24"
    $ dig +short TXT o-o.myaddr.l.google.com @9.9.9.9
    "162.244.55.23"
    $ dig +short TXT o-o.myaddr.l.google.com @1.1.1.1
    "172.71.221.175"
The opendns implementation returns nothing if you try something similar to the last three.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by arjvik on Monday July 31, 2023 @09:32PM (#36951240)
There's a whole list of such resolvers:

Akamai:

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

    dig +short o-o.myaddr.l.google.com txt @ns1.google.com
Cloudflare:

    dig +short whoami.cloudflare ch txt @1.1.1.1
OpenDNS:

    dig -4 +short myip.opendns.com @resolver1.opendns.com
Note that if you leave off the `@service.authoritative.nameserver` portion of all of the above, you get the IP address of the recursive resolver that your machine is configured to use. If you pass this to a service like https://ipinfo.io/, you can use this to figure out what company's DNS service is currently configured, be it your ISPs, or an internet company like Cloudflare/Google/Quad9.

Arguably, that is the only valid reason to be using an IP address echoer via DNS, as if you truly wanted your own IP, you could fetch it far easier from a service like icanhazip.com.

Personally, Akamai's offering is by far the most useful and convenient--it's an A record, so you won't accidentally forget to add "txt" to your dig invocation, and has a very easy to remember name. Google's works too, though it requires remembering the strange domain name. Cloudflare tries to be cute and uses the Chaosnet DNS class, which while being an incredibly cool reference to internet history, unfortunately is not propagated by most public recursive resolvers. And like the parent comment mentions, OpenDNS somehow blocks requests that pass through a recursive resolver.

Re:Icanhazip: A simple IP address tool survived a deluge of ... by dfc on Monday July 31, 2023 @09:38PM (#36951278)
The opendns server does not return anything if I send the query to anything other than opendns.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by arjvik on Monday July 31, 2023 @10:41PM (#36951703)
Admittedly my comment was incredibly long, but I did include

> And like the parent comment mentions, OpenDNS somehow blocks requests that pass through a recursive resolver.

Re:Icanhazip: A simple IP address tool survived a deluge of ... by pepa65 on Tuesday August 01, 2023 @05:19AM (#36954040)
Cudos: Akamai also doesn't put the returned IP address in quotes, unlike Google and Cloudflare.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by arjvik on Tuesday August 01, 2023 @12:10PM (#36957984)
By virtue of being an A record (native IP address) rather than a TXT record (string)
Re:Icanhazip: A simple IP address tool survived a deluge of ... by p1mrx on Monday July 31, 2023 @07:56PM (#36950556)
"https://myresolver.info/" was good while it lasted. It used stupid DNS tricks to show your resolver in the browser:

https://web.archive.org/web/20131126131155/https://ndkyez8kh...

Re:Icanhazip: A simple IP address tool survived a deluge of ... by mgbmtl on Monday July 31, 2023 @08:40PM (#36950885)
You could write a program that listens on port 53, parses the query and returns the correct value?

DNS is hard to implement, but for responding to a very specific type of query, should be easy?

Re:Icanhazip: A simple IP address tool survived a deluge of ... by theblazehen on Tuesday August 01, 2023 @03:28AM (#36953355)
In addition to the others, there is also https://www.dns.toys/