News for hackers. Stuff that matters.
Re:Ask HN: How did internet discover my subdomain? by lewiscollard on Friday March 07, 2025 @04:57AM (#43288802)
Depending on the web server's configuration, you very much _can_ find the domain which is configured on an IP address, by attempting to connect to that IP address via HTTPS and seeing what certificate gets served. Here's an example:

https://138.68.161.203/

> Web sites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for 138.68.161.203. The certificate is only valid for the following names: exhaust.lewiscollard.com, www.exhaust.lewiscollard.com

Re:Ask HN: How did internet discover my subdomain? by jchw on Friday March 07, 2025 @05:50AM (#43289108)
I don't think that does you any good for Cloudflare, though. They will definitely be using SNI.
Re:Ask HN: How did internet discover my subdomain? by kelnos on Friday March 07, 2025 @06:32AM (#43289333)
That doesn't really matter, though. While OP is using Cloudflare, the actual server behind it is still a publicly-accessible IP address that an IPv4 space scanner can easily stumble upon.
Re:Ask HN: How did internet discover my subdomain? by jchw on Friday March 07, 2025 @07:20AM (#43289570)
I misunderstood, I thought the subdomain was an R2 bucket. If it's just normal Cloudflare proxying to some backend this is probably the most likely answer.

That said, while I think it's not the case here, using Cloudflare doesn't mean the underlying host is accessible, as even on the free tier you can use Cloudflare Tunnels, which I often do.

Re:Ask HN: How did internet discover my subdomain? by ratg13 on Friday March 07, 2025 @07:44PM (#43296440)
they only state they are using cloudflare for DNS, they didn't say if they were proxying the connection
Re:Ask HN: How did internet discover my subdomain? by jchw on Friday March 07, 2025 @11:57PM (#43297617)
Also a valid point. I guess without more details all we can really do is speculate about the exact setup. That said, I do now agree that the most likely answer is "the underlying host was accessible and caught by an IPv4 scanner" since well, that's pretty much what it says anyway.