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

DNS Naming clash between TXT Record and CNAME/A-Record

· 52CE 我爱测

I observed an unexpected behavior in the usage of Azure DNS Zones. I have the following DNS Records: _acme_challenge.<mysubdomain1> IN TXT -> any value * IN CNAME -> <mysubdomain2>.<mydomain>.com <mysubdomain2> IN A -> <myIPaddre…

问题原文

原帖链接 · Norbert Koch · CC BY-SA 4.0

I observed an unexpected behavior in the usage of Azure DNS Zones.

I have the following DNS Records:

_acme_challenge.<mysubdomain1>  IN TXT   -> any value
*                               IN CNAME -> <mysubdomain2>.<mydomain>.com
<mysubdomain2>                  IN A     -> <myIPaddress> 

If I am doing now a nslookup to: <mysubdomain1>.<mydomain>.com, I would expect to get a valid response for: myIPaddress. But the TXT record is blocking the resolution. After removing the TXT-Entry, I receive the expected result.

Do you know if this behavior is right? For me it seems wrong. But it is not really clear, if it works as expected and on purpose.

There is already a discussion about the exact same topic: https://github.com/cert-manager/cert-manager/issues/806, but not with a meaningful final result.

Hope you can help! Thanks

已采纳解答

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

This is actually expected behaviour.

RFC1034 has this information:

Wildcard RRs do not apply:

  • When the query is in another zone. That is, delegation cancels the wildcard defaults.

  • When the query name or a name between the wildcard domain and the query name is know to exist. For example, if a wildcard RR has an owner name of "*.X", and the zone also contains RRs attached to B.X, the wildcards would apply to queries for name Z.X (presuming there is no explicit information for Z.X), but not to B.X, A.B.X, or X.

and this is the second bullet at play here. Your LetsEncrypt challenge record:

_acme_challenge.<mysubdomain1>  IN TXT   -> any value

introduced a name <mysubdomain1> and this cancelled the wildcard. What you need is:

<mysubdomain1>                  IN CNAME -> <mysubdomain2>.<mydomain>.com

as @gapsf suggested (you may have it in addition to existing wildard record).

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

资料来源与适用范围

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

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

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