因此,如果我使用 dig 进行反向查找,我会得到:
$ dig 71.74.56.122
; <<>> DiG 9.6.0-APPLE-P2 <<>> 71.74.56.122
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41277
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;71.74.56.122. IN A
;; ANSWER SECTION:
71.74.56.122. 655360 IN A 71.74.56.122
使用 nslookup,我得到:
$ nslookup 71.74.56.122
Server: 10.0.1.1
Address: 10.0.1.1#53
Non-authoritative answer:
122.56.74.71.in-addr.arpa name = hrndva-omtalb.mail.rr.com.
谁能告诉我为什么 dig 拒绝进行反向查找?
答案1
dig 需要“-x”标志来对 IP 进行反向查找。
或者,您可以使用完整形式“dig PTR 122.56.74.71.in-addr.arpa”。