Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente | |||
linux:dns [04-03-2020 22:51] edmc73 |
linux:dns [10-03-2020 16:50] edmc73 |
||
---|---|---|---|
Ligne 17: | Ligne 17: | ||
Google propose un site web comme interface avec dig => https:// | Google propose un site web comme interface avec dig => https:// | ||
+ | Commande de base, utilise votre config dns local | ||
+ | < | ||
+ | $ dig google.com | ||
+ | |||
+ | ; <<>> | ||
+ | ;; global options: +cmd | ||
+ | ;; Got answer: | ||
+ | ;; ->> | ||
+ | ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 | ||
+ | |||
+ | ;; OPT PSEUDOSECTION: | ||
+ | ; EDNS: version: 0, flags:; udp: 65494 | ||
+ | ;; QUESTION SECTION: | ||
+ | ; | ||
+ | |||
+ | ;; ANSWER SECTION: | ||
+ | google.com. 264 IN A 216.58.209.238 | ||
+ | |||
+ | ;; Query time: 7 msec | ||
+ | ;; SERVER: 127.0.0.53# | ||
+ | ;; WHEN: Tue Mar 10 16:44:40 CET 2020 | ||
+ | ;; MSG SIZE rcvd: 55 | ||
+ | </ | ||
+ | |||
+ | Questionner un autre serveur DNS | ||
+ | < | ||
+ | $ dig google.com @8.8.8.8 | ||
+ | |||
+ | ; <<>> | ||
+ | ;; global options: +cmd | ||
+ | ;; Got answer: | ||
+ | ;; ->> | ||
+ | ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 | ||
+ | |||
+ | ;; OPT PSEUDOSECTION: | ||
+ | ; EDNS: version: 0, flags:; udp: 512 | ||
+ | ;; QUESTION SECTION: | ||
+ | ; | ||
+ | |||
+ | ;; ANSWER SECTION: | ||
+ | google.com. 299 IN A 216.58.204.110 | ||
+ | |||
+ | ;; Query time: 24 msec | ||
+ | ;; SERVER: 8.8.8.8# | ||
+ | ;; WHEN: Tue Mar 10 16:44:44 CET 2020 | ||
+ | ;; MSG SIZE rcvd: 55 | ||
+ | </ | ||
+ | Consulter les NS | ||
+ | < | ||
+ | $ dig NS google.com | ||
+ | |||
+ | ; <<>> | ||
+ | ;; global options: +cmd | ||
+ | ;; Got answer: | ||
+ | ;; ->> | ||
+ | ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1 | ||
+ | |||
+ | ;; OPT PSEUDOSECTION: | ||
+ | ; EDNS: version: 0, flags:; udp: 65494 | ||
+ | ;; QUESTION SECTION: | ||
+ | ; | ||
+ | |||
+ | ;; ANSWER SECTION: | ||
+ | google.com. 14416 IN NS ns3.google.com. | ||
+ | google.com. 14416 IN NS ns4.google.com. | ||
+ | google.com. 14416 IN NS ns1.google.com. | ||
+ | google.com. 14416 IN NS ns2.google.com. | ||
+ | |||
+ | ;; Query time: 117 msec | ||
+ | ;; SERVER: 127.0.0.53# | ||
+ | ;; WHEN: Tue Mar 10 16:45:00 CET 2020 | ||
+ | ;; MSG SIZE rcvd: 111 | ||
+ | </ | ||
+ | |||
+ | Renvoie le PTR | ||
+ | < | ||
+ | $ dig -x google.com | ||
+ | |||
+ | ; <<>> | ||
+ | ;; global options: +cmd | ||
+ | ;; Got answer: | ||
+ | ;; ->> | ||
+ | ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 | ||
+ | |||
+ | ;; OPT PSEUDOSECTION: | ||
+ | ; EDNS: version: 0, flags:; udp: 65494 | ||
+ | ;; QUESTION SECTION: | ||
+ | ; | ||
+ | |||
+ | ;; Query time: 170 msec | ||
+ | ;; SERVER: 127.0.0.53# | ||
+ | ;; WHEN: Tue Mar 10 16:45:07 CET 2020 | ||
+ | ;; MSG SIZE rcvd: 52 | ||
+ | </ | ||
+ | Renvoie tous les type de record enregistré dans le DNS | ||
+ | < | ||
+ | $ dig ANY google.com | ||
+ | |||
+ | ; <<>> | ||
+ | ;; global options: +cmd | ||
+ | ;; Got answer: | ||
+ | ;; ->> | ||
+ | ;; flags: qr rd ra; QUERY: 1, ANSWER: 18, AUTHORITY: 0, ADDITIONAL: 1 | ||
+ | |||
+ | ;; OPT PSEUDOSECTION: | ||
+ | ; EDNS: version: 0, flags:; udp: 65494 | ||
+ | ;; QUESTION SECTION: | ||
+ | ; | ||
+ | |||
+ | ;; ANSWER SECTION: | ||
+ | google.com. 233 IN A 216.58.209.238 | ||
+ | google.com. 14405 IN NS ns4.google.com. | ||
+ | google.com. 14405 IN NS ns1.google.com. | ||
+ | google.com. 14405 IN NS ns2.google.com. | ||
+ | google.com. 14405 IN NS ns3.google.com. | ||
+ | google.com. 59 IN SOA ns1.google.com. dns-admin.google.com. 299797304 900 900 1800 60 | ||
+ | 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 50 alt4.aspmx.l.google.com. | ||
+ | google.com. 599 IN MX 30 alt2.aspmx.l.google.com. | ||
+ | google.com. 599 IN MX 10 aspmx.l.google.com. | ||
+ | google.com. 299 IN TXT " | ||
+ | google.com. 299 IN TXT " | ||
+ | google.com. 3599 IN TXT " | ||
+ | google.com. 3599 IN TXT " | ||
+ | google.com. 299 IN TXT " | ||
+ | google.com. 299 IN AAAA 2a00: | ||
+ | google.com. 21599 IN CAA 0 issue " | ||
+ | |||
+ | ;; Query time: 49 msec | ||
+ | ;; SERVER: 127.0.0.53# | ||
+ | ;; WHEN: Tue Mar 10 16:45:11 CET 2020 | ||
+ | ;; MSG SIZE rcvd: 649 | ||
+ | </ | ||
+ | |||
+ | Retourne le résultat dans un format court | ||
+ | < | ||
+ | $ dig MX google.com +short | ||
+ | 10 aspmx.l.google.com. | ||
+ | 30 alt2.aspmx.l.google.com. | ||
+ | 50 alt4.aspmx.l.google.com. | ||
+ | 40 alt3.aspmx.l.google.com. | ||
+ | 20 alt1.aspmx.l.google.com. | ||
+ | </ |