在使用 test.com 的 DNS 时,我发现如果我查询任何内容,我都会得到有效的响应。
例如:
dig superuser-is-awesome.test.com -t TXT
; <<>> DiG 9.10.5-P2-RedHat-9.10.5-2.P2.fc25 <<>> superuser-is-awesome.test.com -t TXT
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52365
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;superuser-is-awesome.test.com. IN TXT
;; ANSWER SECTION:
superuser-is-awesome.test.com. 7200 IN TXT "v=spf1 ~all"
;; Query time: 133 msec
;; SERVER: 89.2.0.1#53(89.2.0.1)
;; WHEN: ven. sept. 01 14:28:12 CEST 2017
;; MSG SIZE rcvd: 86
A
它对于类型或甚至没有类型都同样有效:
dig superuser-is-awesome.test.com
; <<>> DiG 9.10.5-P2-RedHat-9.10.5-2.P2.fc25 <<>> superuser-is-awesome.test.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9026
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;superuser-is-awesome.test.com. IN A
;; ANSWER SECTION:
superuser-is-awesome.test.com. 3600 IN A 69.172.200.109
;; Query time: 130 msec
;; SERVER: 89.2.0.1#53(89.2.0.1)
;; WHEN: ven. sept. 01 14:29:20 CEST 2017
;; MSG SIZE rcvd: 74
这怎么可能?有没有办法获取真实值(应该什么都没有,除非真的存在)?
答案1
免责声明:我不确定这是一个正确的答案,但我还是根据原帖者的请求发布了它。
test.com
是一个真实的域,由公司注册在佛罗里达州名为“Perfect Privacy, LLC”。
域可以具有通配符 DNS 条目为其创建。
此通配符 DNS 记录将导致对以 example.com 结尾的不存在的域名进行 DNS 查找,从而为其合成 MX 记录。因此,查找 somerandomname.example.com 的 MX 记录将返回指向 host1.example.com 的 MX 记录。
然而,DNS 记录对于 test.com 并不表明他们有我可以看到的通配符条目:
DNS Records for test.com
==============
Name TTL Class Type Priority Data
test.com. 7200 IN SOA NS65.WORLDNIC.com. namehost.WORLDNIC.com. 117070512 10800 3600 604800 3600
test.com. 7200 IN NS ns65.worldnic.com.
test.com. 7200 IN NS ns66.worldnic.com.
test.com. 3600 IN A 69.172.200.235
test.com. 7200 IN TXT "google-site-verification=kW9t2V_S7WjOX57zq0tP8Ae_WJhRwUcZoqpdEkvuXJk"
test.com. 7200 IN MX 30 lastmx.spamexperts.net.
test.com. 7200 IN MX 20 fallbackmx.spamexperts.eu.
test.com. 7200 IN MX 10 mx.spamexperts.com.
答案2
这些是通配符 DNS 条目。在我自己的 DNS 服务器上测试了它,它看起来是这样的:
dig hans.xxx.xxx.net TXT
; <<>> DiG 9.9.5-3ubuntu0.15-Ubuntu <<>> hans.xxx.xxx.net TXT
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64899
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;hans.xxx.xxx.net. IN TXT
;; ANSWER SECTION:
hans.xxx.xxx.net. 3600 IN TXT "Test"
;; Query time: 22 msec
;; SERVER: 10.0.2.166#53(10.0.2.166)
;; WHEN: Fri Sep 01 15:13:36 DST 2017
;; MSG SIZE rcvd: 65
dig hans.xxx.xxx.net
; <<>> DiG 9.9.5-3ubuntu0.15-Ubuntu <<>> hans.xxx.xxx.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42482
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;hans.xxx.xxx.net. IN A
;; ANSWER SECTION:
hans.xxx.xxx.net. 3600 IN A 10.0.2.81
;; Query time: 13 msec
;; SERVER: 10.0.2.166#53(10.0.2.166)
;; WHEN: Fri Sep 01 15:19:46 DST 2017
;; MSG SIZE rcvd: 64