nslookup

Este comando nos sirve para saber la ip a la cual está ligada el nombre DNS de un sitio en internet.


Uso comun del comando nslookup

$ nslookup example.com
Servidor: dns.dominio.com
Address: 1.2.3.4

Respuesta no autoritativa:
Nombre: example.com
Addresses: 2606:2800:220:1:248:1893:25c8:1946
93.184.216.34

Modo Interactivo de nslookup

Cuando se ejecuta el comando nslookup sin ningún parametro o usando el signo -, se usa el modo interactivo. Este modo nos permite realizar muchas consultas simultaneas.

$ nslookup
Servidor: dns.dominio.com
Address: 1.2.3.4

> example.com
Servidor: dns.dominio.com
Address: 1.2.3.4

Respuesta no autoritativa:
Nombre: example.com
Addresses: 2606:2800:220:1:248:1893:25c8:1946
93.184.216.34

>

Como saber los nombres de los servidores de correo ligados a un dominio.

$ nslookup -q=MX gmail.com
Servidor: dns.dominio.com
Address: 1.2.3.4

Respuesta no autoritativa:
gmail.com MX preference = 40, mail exchanger = alt4.gmail-smtp-in.l.google.com
gmail.com MX preference = 20, mail exchanger = alt2.gmail-smtp-in.l.google.com
gmail.com MX preference = 10, mail exchanger = alt1.gmail-smtp-in.l.google.com
gmail.com MX preference = 5, mail exchanger = gmail-smtp-in.l.google.com
gmail.com MX preference = 30, mail exchanger = alt3.gmail-smtp-in.l.google.com

alt4.gmail-smtp-in.l.google.com internet address = 64.233.190.27
alt4.gmail-smtp-in.l.google.com AAAA IPv6 address = 2800:3f0:4003:c01::1b
alt2.gmail-smtp-in.l.google.com internet address = 173.194.68.27
alt2.gmail-smtp-in.l.google.com AAAA IPv6 address = 2607:f8b0:400d:c0c::1b
alt1.gmail-smtp-in.l.google.com internet address = 173.194.219.27
alt1.gmail-smtp-in.l.google.com AAAA IPv6 address = 2607:f8b0:4002:c03::1b
gmail-smtp-in.l.google.com internet address = 64.233.178.27
gmail-smtp-in.l.google.com AAAA IPv6 address = 2607:f8b0:4003:c0a::1a
alt3.gmail-smtp-in.l.google.com internet address = 173.194.210.27
alt3.gmail-smtp-in.l.google.com AAAA IPv6 address = 2607:f8b0:400c:c0f::1b

En el modo interactivo se puede poner lo siguiente

> set q=mx
> gmail.com
Servidor: dns.dominio.com
Address: 1.2.3.4

Respuesta no autoritativa:
gmail.com MX preference = 20, mail exchanger = alt2.gmail-smtp-in.l.google.com
gmail.com MX preference = 10, mail exchanger = alt1.gmail-smtp-in.l.google.com
gmail.com MX preference = 5, mail exchanger = gmail-smtp-in.l.google.com
gmail.com MX preference = 30, mail exchanger = alt3.gmail-smtp-in.l.google.com
gmail.com MX preference = 40, mail exchanger = alt4.gmail-smtp-in.l.google.com

gmail-smtp-in.l.google.com internet address = 64.233.178.26

 

.S