Hacker News new | ask | show | jobs
by judge2020 2486 days ago
It would also probably be good to use Cloudflare's own ip lookup service, available on every CF website's "/cdn-cgi/trace" page. The only thing is that you need to find a ipv4-only CF website to get the v4 instead of v6.
3 comments

Accessing the cloudflare IP address directly works.

For example http://1.1.1.1/cdn-cgi/trace

IIRC that's never been a public API; more of an artifact for troubleshooting/support. Relying on it / parsing it directly was never recommended when I was there.
Is this documented somewhere? Are there other endpoints available by default under /cdn-cgi/? I looked around a bit but couldn't find any official documentation of this.
This is actually the fastest, always responds under 100ms! I put this in, thanks!
very groovy, thanks!
Huh. didn't know this existed! Thanks! Is there a list of other pages cloudflare serves outside of this one?
Don't think there's a list; the only other pages that I see regularly are for email protection[0], CF apps[1] (the ones that inject scripts), expect-ct (CT monitoring), and image resizing[2].

0: https://blog.cloudflare.com/introducing-scrapeshield-discove...

1: https://www.cloudflare.com/apps/

2: https://blog.cloudflare.com/announcing-cloudflare-image-resi...

Or just have the tool open an ipv4 socket when accessing it.
That only works if you're not behind carrier grade NAT.
The goal is to lookup your own public IP address to store it in a DNS record. If you're behind a carrier grade NAT, there isn't much use in that exercise, right?
If you're behind a carrier NAT, would dyndns even have a purpose?