miércoles, 27 de diciembre de 2017

Pasos para verificar la correcta configuración de un DNS

Primero iniciamos con el comando Host
Devuelve los registros DNS configurados para un dominio.
No incluye los registros configurados para los subdominios.

Sintaxis
#host [modificadores] dominio

#host google.com
google.com has address 172.217.2.78
google.com has IPv6 address 2607:f8b0:4008:80c::200e
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.

⧫ Configuración de correo
⧫ Dirección Ip

Para mostrar los registros de un tipo MX:
#host -t MX google.com
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.

⧫ Configuración de correo

Para obtener la dns inversa
#host 172.217.2.78
78.2.217.172.in-addr.arpa domain name pointer ord08s13-in-f14.1e100.net.
78.2.217.172.in-addr.arpa domain name pointer mia09s01-in-f14.1e100.net.
78.2.217.172.in-addr.arpa domain name pointer mia09s01-in-f14.1e100.net.
78.2.217.172.in-addr.arpa domain name pointer ord08s13-in-f14.1e100.net.

#host -t PTR 172.217.2.78
78.2.217.172.in-addr.arpa domain name pointer mia09s01-in-f14.1e100.net.
78.2.217.172.in-addr.arpa domain name pointer ord08s13-in-f14.1e100.net.
78.2.217.172.in-addr.arpa domain name pointer ord08s13-in-f14.1e100.net.
78.2.217.172.in-addr.arpa domain name pointer mia09s01-in-f14.1e100.net.

#host -t A google.com
google.com has address 172.217.0.174


Ahora pasamos al comando dig, el cual es mas versátil que el host

#dig google.com

; <<>> DiG 9.9.5-9+deb8u9-Debian <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53622
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com. IN A

;; ANSWER SECTION:
google.com. 299 IN A 172.217.2.78

;; Query time: 212 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Dec 27 15:31:40 VET 2017
;; MSG SIZE  rcvd: 55


#dig -t MX google.com

; <<>> DiG 9.9.5-9+deb8u9-Debian <<>> -t MX google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39792
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com. IN MX

;; ANSWER SECTION:
google.com. 599 IN MX 20 alt1.aspmx.l.google.com.
google.com. 599 IN MX 40 alt3.aspmx.l.google.com.
google.com. 599 IN MX 10 aspmx.l.google.com.
google.com. 599 IN MX 50 alt4.aspmx.l.google.com.
google.com. 599 IN MX 30 alt2.aspmx.l.google.com.

;; Query time: 61 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Dec 27 15:32:08 VET 2017
;; MSG SIZE  rcvd: 147


dig @172.217.2.78 google.com

Ahora para saber si el DNS está resolviendo correctamente los nombres y las IPs


#nslookup 172.217.2.78
Server: 8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
78.2.217.172.in-addr.arpa name = ord08s13-in-f14.1e100.net.
78.2.217.172.in-addr.arpa name = mia09s01-in-f14.1e100.net.
78.2.217.172.in-addr.arpa name = ord08s13-in-f14.1e100.net.
78.2.217.172.in-addr.arpa name = mia09s01-in-f14.1e100.net.

Authoritative answers can be found from:


#nslookup mail.google.com
Server: 8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
Name: google.com
Address: 172.217.2.78


No hay comentarios:

Publicar un comentario