Você pode usar dig para obter todas as informações de DNS relevantes que apontam para um host específico. Você precisa saber qual é o servidor de nomes autoritativo para esse nome de host e executar: dig @ns.example.com example.com ANY
.
Substitua ns.example.com
pelo antigo servidor de nomes e example.com
pelo nome do host em que você está interessado.
( dig
é parte do pacote bind
, geralmente os clientes estão em um pacote separado, por exemplo, link )
Exemplo de saída
; <<>> DiG 9.6.0-APPLE-P2 <<>> @ns1.yahoo.com yahoo.com ANY
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26934
;; flags: qr aa rd; QUERY: 1, ANSWER: 14, AUTHORITY: 0, ADDITIONAL: 7
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;yahoo.com. IN ANY
;; ANSWER SECTION:
yahoo.com. 1800 IN SOA ns1.yahoo.com. hostmaster.yahoo-inc.com. 2012042707 3600 300 1814400 600
yahoo.com. 3600 IN A 209.191.122.70
yahoo.com. 3600 IN A 72.30.38.140
yahoo.com. 3600 IN A 98.139.183.24
yahoo.com. 1800 IN MX 1 mta6.am0.yahoodns.net.
yahoo.com. 1800 IN MX 1 mta7.am0.yahoodns.net.
yahoo.com. 1800 IN MX 1 mta5.am0.yahoodns.net.
yahoo.com. 172800 IN NS ns3.yahoo.com.
yahoo.com. 172800 IN NS ns1.yahoo.com.
yahoo.com. 172800 IN NS ns2.yahoo.com.
yahoo.com. 172800 IN NS ns6.yahoo.com.
yahoo.com. 172800 IN NS ns4.yahoo.com.
yahoo.com. 172800 IN NS ns5.yahoo.com.
yahoo.com. 172800 IN NS ns8.yahoo.com.
;; ADDITIONAL SECTION:
ns1.yahoo.com. 172800 IN A 68.180.131.16
ns2.yahoo.com. 172800 IN A 68.142.255.16
ns3.yahoo.com. 172800 IN A 121.101.152.99
ns4.yahoo.com. 172800 IN A 68.142.196.63
ns5.yahoo.com. 172800 IN A 119.160.247.124
ns6.yahoo.com. 172800 IN A 202.43.223.170
ns8.yahoo.com. 172800 IN A 202.165.104.22
;; Query time: 19 msec
;; SERVER: 68.180.131.16#53(68.180.131.16)
;; WHEN: Sat Apr 28 19:27:50 2012
;; MSG SIZE rcvd: 449