子域中带有后缀的 DNS 通配符

DNS Wildcard With Suffix in Subdomain

是否可以在子域中使用带后缀的 DNS 通配符?

示例:

A Record:
*foo.example.com -> 192.0.2.1

Resolves:
test1-foo.example.com
test2-foo.example.com
test3-foo.example.com

这可能吗?或者,通配符是否需要整个子域,例如 *.example.com

Is it possible to have a DNS wildcard with a suffix in the subdomain?

没有

通配符不能那样工作。

所有解释请参见 RFC8499 和 RFC4592,尤其是第二个。

2.1.1. Wildcard Domain Name and Asterisk Label

A "wildcard domain name" is defined by having its initial (i.e., leftmost or least significant) label be, in binary format:

 0000 0001 0010 1010 (binary) = 0x01 0x2a (hexadecimal)

The first octet is the normal label type and length for a 1-octet- long label, and the second octet is the ASCII representation [RFC20] for the '*' character.

简而言之,*foo 不是 每个 DNS 规则的通配符。