Context
Operating systems (Windows, MacOS, Linux, iOS, Android), but also browsers (Firefox, Brave, Edge, etc.) have ways to use DOH.
DNS-over-HTTPS works by the system talking to an endpoint like 'https://cloudflare-dns.com/dns-query'.
Let's say the client is in a network that restricts DNS traffic over port 53 udp. Also the router does not serve as a DNS-resolver for the client. (The network enforces using DOH (or DOT).)
Catch22?
How will the client resolve the first hostname 'cloudflare-dns.com' to set-up the DOH-DNS-querying connection?
It seems that out of the box, DOH communication always requires at least one DNS query over UDP port 53. That is if you use the traditional hostname-based endpoints.
Or is this statement incorrect, are DOH provider endpoint IPs pre-loaded in Windows 11? I can see their hostname is preloaded, but does it actually know where to connect to if it cannot query this hostname itself before DOH?
For Cloudflare I could remember its IP-based endpoint 'https://1.1.1.1/dns-query' and perhaps for Quad9 as well, but for NextDNS and other providers the IPs are not always so easy to remember and I would need internet to lookup their IPs to make those providers work.
Questions
Q1: Is DNS-over-HTTPS(DOH) depended on at least one regular DNS query via UDP port 53 to function? To be able to resolve the DOH server's hostname itself to connect to it?
Q2: If so, in restricted networks with no port 53 fallback or other local DNS-resolver, is using IP-included DOH-endpoint-address(es) (like https://1.1.1.1/dns-query) always required for connectivity to work all the time to avoid the catch22? (Like with hostname-included form (https://cloudflare-dns.com/dns-query)?)
Q3: HTTPS relies on PKI infrastructure and certificates that have a common name (or SAN) like 'cloudflare-dns.com'. Am I breaking a validation step in the chain by using IP-included endpoints instead of hostname-included endpoints?
Q4: This table could be a follow-up question if operating systems have different behaviours.
| Client | Sensitive to DOH-Catch22 | Comment (why not?) |
|---|---|---|
| MacOS (cloudflared) | ? | |
| Windows native | ? | |
| Firefox on MacOS | ? | |
| Edge on MacOS | ? | |
| Firefox on Windows | ? | |
| Edge on Windows | ? | |
| iOS mobileconfig | ? | |
| Android native | ? | |
| Linux-based via Cloudflared | ? | |
| Linux-based via Stubby | ? |