大网数据广告活动
服务器运维问答

Can doh-proxy work with a private DNS server?

· 52CE 我爱测

I have a DNS server running inside our private network on IP 10.10.0.10. The DNS servers resolves URL’s to private IP’s also inside our network. SSL for all URL’s is handled by a wildcard cert for a .BIZ domain. But recently Chro…

问题原文

原帖链接 · Bob C. · CC BY-SA 4.0

I have a DNS server running inside our private network on IP 10.10.0.10. The DNS servers resolves URL’s to private IP’s also inside our network. SSL for all URL’s is handled by a wildcard cert for a .BIZ domain. But recently Chrome & Firefox began enabling DNS-over-HTTPS during recent updates. Since our DNS server is not DOH compliant, users cannot navigate to our URL’s unless they disable the DOH feature inside their browser.

Ideally I would like our users to keep DOH enabled inside their browsers and still rely on the local DNS server to resolve URL’s to our private IP’s. In an attempt to achieve this I looked at doh-proxy. I spun up a Centos-7 VM on IP 10.10.0.20, installed doh-proxy, and opened up port 443. I then executed:

/usr/local/bin/doh-proxy --upstream-resolver=10.10.0.10 --certfile=/etc/pki/public/mycompany.bundle.biz.crt --keyfile=/etc/pki/private/mycompany.biz.pem

Using netstat I verified port 443 was listening. I then modified my VPN configuration to change the DNS setting from 10.10.0.10 to 10.10.0.20 (the new doh-proxy server). However I still could not navigate to our URL’s with DOH enabled in the browser.

Am I misunderstanding the intent behind doh-proxy?

已采纳解答

原帖链接 · Håkan Lindqvist · CC BY-SA 4.0

I don't think that you misunderstand the intent behind doh-proxy, it appears to be a DoH frontend for a regular DNS resolver server, creating a way for DoH clients to query said resolver server.
There are several other such proxy solutions, if this particular implementation would turn out to not be suitable for whatever reason.

What I believe that you may have misunderstood/overlooked, however, is that to configure DoH, the client needs to know the URL for the DoH server (eg https://dns.quad9.net/dns-query, https://dns.google/dns-query, etc), having just an IP address does nothing for setting up DoH.

And, to make matters difficult, DoH currently has no proper discovery mechanism in place. (Which is the root cause behind a lot of the controversy around DoH, especially so with Mozilla's approach.)

Examples of how "DoH enabled by default" works at this point:

  • Firefox is set up to know the DoH server to use (Mozilla picks a DoH service on behalf of their users, disregarding OS configuration).
  • Chrome selectively upgrades from plain DNS to DoH based on a mapping table with well-known IP addresses of DNS services as the key, eg 8.8.8.8 -> https://dns.google/dns-query (Google maintains a mapping table for well-known DNS services and the DoH upgrade only occurs when the mapping table facilitates querying the same DNS service that the OS configuration indicates for plain DNS).

All in all, it's easy enough to run your own DoH service, not necessarily easy to make clients use it.

What you need to do is to somehow tell the clients to use https://dns.example.com/dns-query (if we assume this is the proper URL for your proxy) as their DoH endpoint, which in its simplest form probably means manual configuration on the clients (per application, no less).
You can certainly find ways of automating the configuration of a set of known applications, but at this point there is no established discovery method comparable to how for example DHCP can deliver the addresses for plain DNS.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-08-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。