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

Unbound doesn't accept answer from non-DNSSEC forward rule

· 52CE 我爱测

Unbound gets the right answer (see below) from a forward-zone, but proceeds to ignore it and try to query other DNS servers. I'm running unbound (1.10.0) on a docker image when behind a public hotspot. I've added forward-rules to…

问题原文

原帖链接 · shil88 · CC BY-SA 4.0

Unbound gets the right answer (see below) from a forward-zone, but proceeds to ignore it and try to query other DNS servers.

I'm running unbound (1.10.0) on a docker image when behind a public hotspot.

I've added forward-rules to allow communication when detecting that a login is required.

Important note: At this moment I don't have access to internet, I can just ping a local DNS in the router and a couple of domains.

Here's the unbound log

And the config file: (unbound.conf)

From the logs I can see that it has correct response from the forward-zone dns server.

unbound    | [1587387141] unbound[1:0] info: incoming scrubbed packet: ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 0
unbound    | ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 
unbound    | ;; QUESTION SECTION:
unbound    | telekom.portal.fon.com.    IN  A
unbound    | 
unbound    | ;; ANSWER SECTION:
unbound    | telekom.portal.fon.com.    42099   IN  A   87.140.198.194
unbound    | 
unbound    | ;; AUTHORITY SECTION:
unbound    | 
unbound    | ;; ADDITIONAL SECTION:
unbound    | ;; MSG SIZE  rcvd: 56

But then proceeds to query root dns servers or other forward-zones I have defined.

It seems to work if I remove/comment from the config the following line:

auto-trust-anchor-file: "var/root.key"

But it's not sensitive to any other configuration option.

Thanks

edit: it proceeds to query root dns servers, not root hosts

已采纳解答

原帖链接 · shil88 · CC BY-SA 4.0

This was solved adding the domain-insecure option to unbound.conf

Found the answer at bugs.debian.org

This is the diff that allowed it to work

diff --git a/etc-unbound/unbound.conf b/etc-unbound/unbound.conf
index 0371a99..3fe25d6 100644
--- a/unbound.conf
+++ b/unbound.conf
@@ -306,6 +306,8 @@ server:
     # Include file for local-data and local-data-ptr
     include: /opt/unbound/etc/unbound/a-records.conf

+    domain-insecure: "portal.fon.com"
+
     ###########################################################################
     # FORWARD ZONE
     ###########################################################################

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

资料来源与适用范围

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

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

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