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

Does a DNS server intercept and respond to DNS requests even if it is not the intended DNS server of the requesting machine?

· 52CE 我爱测

"A" wants to resolve google.com using DNS Server 1 or 2 (as set in IPv4 settings on the NIC). But DNS Server 3 is between "A" and either DNS Server. Will server 3 attempt to respond to the DNS query? Or will the query be ignored …

问题原文

原帖链接 · David Breeden · CC BY-SA 3.0

"A" wants to resolve google.com using DNS Server 1 or 2 (as set in IPv4 settings on the NIC). But DNS Server 3 is between "A" and either DNS Server. Will server 3 attempt to respond to the DNS query? Or will the query be ignored until it reaches its intended target DNS server?

已采纳解答

原帖链接 · Patrick Mevzek · CC BY-SA 3.0

Each computer has a list of recursive DNS servers to contact.

When it needs to resolve a name it will contact one of these servers (typically the first one in the list, and switching to the second one only if the first one did not reply at all).

Of course, as anything traveling in the clear on the network, any element in the path could intercept either the query or the reply, and rewrite it.

It happens, and it is called "lying DNS". Some ISP for example may be tempted to rewrite NXDOMAIN replies (when the resource queried does not exist) to instead point you to a generic search engine page or things like that.

The client may or may not easily see that if it happens in the generic case. Only if the resource queried uses DNSSEC the client could verify that the answer was not modified in transit. Or, for greater security, it will need to use DNS over TLS or DNS over HTTPS, as long as it checks the remote certificate. Have a look at the software dnssec-trigger based on unbound.

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

资料来源与适用范围

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

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

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