Ferramentas do usuário

Ferramentas do site


infra-estrutura:linux:bind:comando_consulta

Comando de consulta DNS

Listar todos os rgistros DNS de um domínio utilizando o comando dig

dig +nocmd google.com.br any +multiline +noall +answer

ricardobarbosa@isadora:~$ dig +nocmd google.com.br any +multiline +noall +answer
google.com.br.          299 IN A 172.217.30.99
google.com.br.          299 IN AAAA 2800:3f0:4001:80b::2003
google.com.br.          599 IN MX 30 alt2.aspmx.l.google.com.
google.com.br.          599 IN MX 20 alt1.aspmx.l.google.com.
google.com.br.          599 IN MX 50 alt4.aspmx.l.google.com.
google.com.br.          59 IN SOA ns1.google.com. dns-admin.google.com. (
                                213785242  ; serial
                                900        ; refresh (15 minutes)
                                900        ; retry (15 minutes)
                                1800       ; expire (30 minutes)
                                60         ; minimum (1 minute)
                                )
google.com.br.          21599 IN NS ns4.google.com.
google.com.br.          21599 IN NS ns3.google.com.
google.com.br.          21599 IN TYPE257 \# 15 ( 00056973737565706B692E676F6F67 )
google.com.br.          599 IN MX 40 alt3.aspmx.l.google.com.
google.com.br.          21599 IN NS ns2.google.com.
google.com.br.          599 IN MX 10 aspmx.l.google.com.
google.com.br.          299 IN TXT "v=spf1 -all"
google.com.br.          21599 IN NS ns1.google.com.
ricardobarbosa@isadora:~$ 

Outro comando que também funciona

root@megatron:~#  dig google.com ANY
 
; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com ANY
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24565
;; flags: qr rd ra; QUERY: 1, ANSWER: 16, AUTHORITY: 0, ADDITIONAL: 1
 
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com.                    IN      ANY
 
;; ANSWER SECTION:
google.com.             60      IN      SOA     ns1.google.com. dns-admin.google.com. 213810530 900 900 1800 60
google.com.             600     IN      MX      30 alt2.aspmx.l.google.com.
google.com.             600     IN      MX      10 aspmx.l.google.com.
google.com.             600     IN      MX      20 alt1.aspmx.l.google.com.
google.com.             600     IN      MX      50 alt4.aspmx.l.google.com.
google.com.             600     IN      MX      40 alt3.aspmx.l.google.com.
google.com.             300     IN      TXT     "facebook-domain-verification=22rm551cu4k0ab0bxsw536tlds4h95"
google.com.             300     IN      TXT     "docusign=05958488-4752-4ef2-95eb-aa7ba8a3bd0e"
google.com.             300     IN      TXT     "v=spf1 include:_spf.google.com ~all"
google.com.             86400   IN      CAA     0 issue "pki.goog"
google.com.             300     IN      AAAA    2800:3f0:4001:814::200e
google.com.             257     IN      A       172.217.29.238
google.com.             87586   IN      NS      ns3.google.com.
google.com.             87586   IN      NS      ns1.google.com.
google.com.             87586   IN      NS      ns4.google.com.
google.com.             87586   IN      NS      ns2.google.com.
 
;; Query time: 69 msec
;; SERVER: 192.168.1.252#53(192.168.1.252)
;; WHEN: Thu Sep 20 15:53:02 -04 2018
;; MSG SIZE  rcvd: 514
 
root@megatron:~#

Discussão

Insira seu comentário. Sintaxe wiki é permitida:
 
infra-estrutura/linux/bind/comando_consulta.txt · Última modificação: 2018/09/20 15:53 por ricardobarbosams