為什麼所有 *.localhost.yarf.nl 網域都會解析為「127.0.0.1」?

為什麼所有 *.localhost.yarf.nl 網域都會解析為「127.0.0.1」?

我今天發現了一些有趣的事情:所有域都*.localhost.yarf.nl解析為127.0.0.1.

  • 這是什麼?
  • 這是在哪裡記錄的?
  • 我找不到它的參考...

這裡有一些例子:

» dig aaa.localhost.yarf.nl

; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> aaa.localhost.yarf.nl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18392
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;aaa.localhost.yarf.nl.         IN      A

;; ANSWER SECTION:
aaa.localhost.yarf.nl.  3244    IN      A       127.0.0.1

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Mar 21 07:26:40 CET 2019
;; MSG SIZE  rcvd: 66

和:

» dig whatisthis.localhost.yarf.nl

; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> whatisthis.localhost.yarf.nl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27196
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;whatisthis.localhost.yarf.nl.  IN      A

;; ANSWER SECTION:
whatisthis.localhost.yarf.nl. 3600 IN   A       127.0.0.1

;; Query time: 55 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Mar 21 07:26:52 CET 2019
;; MSG SIZE  rcvd: 73

但:

» dig whatisthis.yarf.nl

; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> whatisthis.yarf.nl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 24959
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;whatisthis.yarf.nl.            IN      A

;; AUTHORITY SECTION:
yarf.nl.                300     IN      SOA     ns091.auroradns.eu. admin.auroradns.eu. 2019011601 86400 7200 604800 300

;; Query time: 38 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Mar 21 07:26:59 CET 2019
;; MSG SIZE  rcvd: 107

和:

» dig yarf.nl

; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> yarf.nl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13207
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;yarf.nl.                       IN      A

;; ANSWER SECTION:
yarf.nl.                3600    IN      A       5.157.81.33

;; Query time: 33 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Mar 21 07:27:06 CET 2019
;; MSG SIZE  rcvd: 52

答案1

為什麼它解析為 127.0.0.1?

它是一個域名,其所有者已添加一條A(地址)記錄127.0.0.1作為值/目的地。字面意思就是這麼簡單。

NAME                   TTL    TYPE    VALUE
--------------------   ---    ----    ---------
*.localhost.yarf.nl.   1h     A       127.0.0.1

為什麼它可以與任何子域?

它是通配符記錄。如果您新增名為 的子網域*,則這被視為“通配符”,並且伺服器將為任何名稱使用相同的資料進行回應(除非被更具體的條目覆蓋)。

相關內容