Possible to share port for web console and DoH? #1065
-
Is it possible to configure Technitium DNS so that the web console and DoH are served over the same port, e.g. 443? Or alternatively, could the web server decide via vhost/SNI which service to use (dns.example.com:443 for the web console, doh.example.com:443 for DoH)? My use case: my self-hosted services are made available through a Cloudflare Zero Trust tunnel. Inside the local network, I bypass Cloudflare and hand out local IPs via DNS. This means that port numbers have to be identical for internal and external access and because Zero Trust HTTPS tunnels can only use port 443, there is no choice. If both the web console and DoH should be accessible over a public network, it would mean running two instances on two local IPs so that I can dispatch to two services on port 443 (in case port sharing is not possible). |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 12 replies
-
Thanks for asking. The admin web panel service and the DoH service are served by different web servers and combining them is not feasible. This has been done deliberately to keep both services independent so as to not affect each other and also make it possible to provide admin panel access to only firewalled networks for security reasons. You can still achieve the same result by using a reverse proxy like nginx where you configure domain names and proxy the /dns-query calls to DoH service port. I have similar setup on a few production deployments. |
Beta Was this translation helpful? Give feedback.
-
Yes, a reverse proxy is a usable workaround. I just wanted to see if it can be done without one to reduce the number of moving pieces and network hops - especially because both services are provided by the same process. I have an nginx running anyway which I can repurpose for this, but I guess I need to solve a follow-up problem: can the A records which deliver local addresses be made visible only when the requester is on the local network? External clients would need to use the external addresses. Currently, I set up a conditional forwarding zone which forwards to "this-server" and has a few A & HTTPS records with local IPs. AFAIK, the Split Horizon app can only deliver different static results for a given request but not forward to another server in one case, right? |
Beta Was this translation helpful? Give feedback.
-
Let me try to clarify the requirements. The DNS server should
I currently use it only for internal users, but I'd like to explore the idea to also use it from mobile devices via DoH, hence the original question. Not resolving the The CNAME approach is promising. The only problem I see is that I would have to pollute the authoritative
Or is there a way to resolve An elegant solution would be ACLs on records where missing permissions would result in rendering a record (or zone) "disabled", i.e. processing continues as if the record didn't exist. As far as I can tell, it's currently only possible to deny / refuse a query based on ACLs. |
Beta Was this translation helpful? Give feedback.
-
To close the loop: it all works flawlessly, thanks again for the great support! My conditional forwarding zone for As for external access, I route the web console through a reverse proxy and let the DoH endpoint on port 443 be the direct target of a Zero Trust tunnel (where performance matters more than for the web console). Mobile devices now use |
Beta Was this translation helpful? Give feedback.
-
One more follow-up: do you have an idea how to make this setup compatible with DNSSEC?
I'm in the process of disabling DNSSEC for example.com, but had been looking into model 2 of multi-signer DNSSEC. If I understood https://developers.cloudflare.com/dns/dnssec/multi-signer-dnssec/setup/ correctly, I would need to add Technitium's ZSK to example.com's DNSKEY record whenever the ZSK rolls over, right? |
Beta Was this translation helpful? Give feedback.
Yes, that will have issue since you need to split resolution for the main zone itself. So, its going to be an issue with validating clients downstream.
This setup with DNSSEC would work only when multi-signer is available with online signing.