Something along the lines of running
dig +short myip.opendns.com @resolver1.opendns.com
on linux, but with 1.1.1.1 instead of opendns?
I don’t believe so, but that is a nice party trick. I will pass it along to the resolver team to consider implementing!
Something like dig TXT resolver.dnscrypt.info
can also be useful.
It’d be an extremely useful party trick! I look forward to this being implemented
I’d love to second that!
Since Cisco has “reworked” OpenDNS, it has been unreliable for me. Currently I am using Google, like this:
dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com
dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
But, I mean, Google… This is Cloudflare. Would be great!!
Any news on support for this feature? I’m using Cloudflare as a DDNS service by updating a record via the API and it would be great to not have to rely on other services for resolving the public IP. It also seems fairly common to have an HTTP(S) endpoint that returns the IP in plain/text which might be easier to deploy. It can’t be more than a few lines in a worker, right?
dig @1.1.1.1 ch txt whoami.Cloudflare +short or if you want to run your own worker… GitHub - matthewgall/beta.ipinfo.in: Ever wanted to run your own IP lookup service like canhazip.com? Don't want to resort to awful PHP? Powered by Cloudflare Workers (https://cloudflareworkers.com)
That’s great! Thank you!
Is there anything for IPv6, by chance? I don’t have a public-facing IPv6 box to test, but would like to update a tool that supports both IPv4 and IPv6 to use the Cloudflare-provided lookup mechanism in both cases if possible.
I haven’t tested but I would assume if you query our IPv6 resolver address for 1.1.1.1 you’d get the IPv6 address back.
It works. Thanks!
For reference:
$ dig +short @2606:4700:4700::1111 -6 ch txt whoami.cloudflare