Eu sei que podemos usar dig -x
para executar uma consulta DNS reversa.
Eu tenho um livro na minha frente que diz que ambos são dig ptr
e dig -x
sintaxe válida.
dig -x
definitivamente funciona para mim, mas não estou recebendo uma resposta com dig ptr
:
~ $ dig ptr 216.239.34.10
; <<>> DiG 9.8.3-P1 <<>> ptr 216.239.34.10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 41447
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;216.239.34.10. IN PTR
;; AUTHORITY SECTION:
. 10800 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2016113001 1800 900 604800 86400
;; Query time: 325 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Nov 30 20:17:10 2016
;; MSG SIZE rcvd: 106
~ $ dig -x 216.239.34.10
; <<>> DiG 9.8.3-P1 <<>> -x 216.239.34.10
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13022
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
;; QUESTION SECTION:
;10.34.239.216.in-addr.arpa. IN PTR
;; ANSWER SECTION:
10.34.239.216.in-addr.arpa. 86400 IN PTR ns2.google.com.
;; AUTHORITY SECTION:
34.239.216.in-addr.arpa. 83894 IN NS ns1.google.com.
34.239.216.in-addr.arpa. 83894 IN NS ns4.google.com.
34.239.216.in-addr.arpa. 83894 IN NS ns2.google.com.
34.239.216.in-addr.arpa. 83894 IN NS ns3.google.com.
;; ADDITIONAL SECTION:
ns1.google.com. 327096 IN A 216.239.32.10
ns2.google.com. 327096 IN A 216.239.34.10
ns3.google.com. 327096 IN A 216.239.36.10
ns4.google.com. 327096 IN A 216.239.38.10
;; Query time: 17 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Nov 30 20:17:18 2016
;; MSG SIZE rcvd: 204
O livro está errado ou desatualizado?
dig ptr
funciona, se você usá-lo comodig ptr 10.34.239.216.in-addr.arpa.