dig : Différence entre versions
De Vulgum Techus
(→Articles Vulgum Techus) |
(→Utile) |
||
(8 révisions intermédiaires par un utilisateur sont masquées) | |||
Ligne 1 : | Ligne 1 : | ||
+ | <!-- Links checked 23/05/19 --> | ||
[[Catégorie:Linux]] | [[Catégorie:Linux]] | ||
[[Catégorie:Sécurité]] | [[Catégorie:Sécurité]] | ||
+ | <!-- Links checked 21/05/19 --> | ||
+ | '''[[Lien court]]''' vers cette page : https://vt.cx/dig | ||
+ | '''[[QR code]]''' vers cette page : https://vt.cx/dig.qr | ||
+ | <html> | ||
+ | <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | ||
+ | <!-- VT2 --> | ||
+ | <ins class="adsbygoogle" | ||
+ | style="display:inline-block;width:468px;height:60px" | ||
+ | data-ad-client="ca-pub-3341840374417340" | ||
+ | data-ad-slot="6349432125"></ins> | ||
+ | <script> | ||
+ | (adsbygoogle = window.adsbygoogle || []).push({}); | ||
+ | </script> | ||
+ | </html> | ||
= Présentation = | = Présentation = | ||
Commande Linux de vérification des '''[[DNS]]''' | Commande Linux de vérification des '''[[DNS]]''' | ||
+ | |||
+ | = Utile = | ||
+ | * '''dig -t txt _acme-challenge.<domaine.tld> +short''' → recherche sur '''_acme-challenge''' dans enregistrements '''TXT''' du '''<domaine.tld>''' | ||
+ | dig NS <domaine.tld> | ||
+ | dig @localhost NS <domaine.tld> | ||
= Commandes = | = Commandes = | ||
liste des DNS sollicités → dig domaine.tld +trace | liste des DNS sollicités → dig domaine.tld +trace | ||
+ | |||
voir les MX d'un domaine → dig mx domaine.tld +short | voir les MX d'un domaine → dig mx domaine.tld +short | ||
+ | |||
IP d'un serveur (version courte) → dig domaine.tld +short | IP d'un serveur (version courte) → dig domaine.tld +short | ||
+ | |||
liste des champs TXT (version courte) → dig domaine.tld txt +short | liste des champs TXT (version courte) → dig domaine.tld txt +short | ||
+ | |||
liste des host names (version courte) → dig domaine.tld ns +short | liste des host names (version courte) → dig domaine.tld ns +short | ||
+ | Usage: dig [@global-server] [domain] [q-type] [q-class] {q-opt} {global-d-opt} host [@local-server] {local-d-opt} [host [@local-server] {local-d-opt} [...]] | ||
+ | |||
+ | Where domain is in the Domain Name System | ||
+ | |||
+ | q-class is one of (in,hs,ch,...) [default: in] | ||
+ | q-type is one of (a,any,mx,ns,soa,hinfo,axfr,txt,...) [default:a] | ||
+ | (Use ixfr=version for type ixfr) | ||
+ | q-opt is one of: | ||
+ | -x dot-notation (shortcut for reverse lookups) | ||
+ | -i (use IP6.INT for IPv6 reverse lookups) | ||
+ | -f filename (batch mode) | ||
+ | -b address[#port] (bind to source address/port) | ||
+ | -p port (specify port number) | ||
+ | -q name (specify query name) | ||
+ | -t type (specify query type) | ||
+ | -c class (specify query class) | ||
+ | -k keyfile (specify tsig key file) | ||
+ | -y [hmac:]name:key (specify named base64 tsig key) | ||
+ | -4 (use IPv4 query transport only) | ||
+ | -6 (use IPv6 query transport only) | ||
+ | -m (enable memory usage debugging) | ||
+ | d-opt is of the form +keyword[=value], where keyword is: | ||
+ | +[no]vc (TCP mode) | ||
+ | +[no]tcp (TCP mode, alternate syntax) | ||
+ | +time=### (Set query timeout) [5] | ||
+ | +tries=### (Set number of UDP attempts) [3] | ||
+ | +retry=### (Set number of UDP retries) [2] | ||
+ | +domain=### (Set default domainname) | ||
+ | +bufsize=### (Set EDNS0 Max UDP packet size) | ||
+ | +ndots=### (Set NDOTS value) | ||
+ | +edns=### (Set EDNS version) | ||
+ | +[no]search (Set whether to use searchlist) | ||
+ | +[no]showsearch (Search with intermediate results) | ||
+ | +[no]defname (Ditto) | ||
+ | +[no]recurse (Recursive mode) | ||
+ | +[no]ignore (Don't revert to TCP for TC responses.) | ||
+ | +[no]fail (Don't try next server on SERVFAIL) | ||
+ | +[no]besteffort (Try to parse even illegal messages) | ||
+ | +[no]aaonly (Set AA flag in query (+[no]aaflag)) | ||
+ | +[no]adflag (Set AD flag in query) | ||
+ | +[no]cdflag (Set CD flag in query) | ||
+ | +[no]cl (Control display of class in records) | ||
+ | +[no]cmd (Control display of command line) | ||
+ | +[no]comments (Control display of comment lines) | ||
+ | +[no]question (Control display of question) | ||
+ | +[no]answer (Control display of answer) | ||
+ | +[no]authority (Control display of authority) | ||
+ | +[no]additional (Control display of additional) | ||
+ | +[no]stats (Control display of statistics) | ||
+ | +[no]short (Disable everything except short form of answer) | ||
+ | +[no]ttlid (Control display of ttls in records) | ||
+ | +[no]all (Set or clear all display flags) | ||
+ | +[no]qr (Print question before sending) | ||
+ | +[no]nssearch (Search all authoritative nameservers) | ||
+ | +[no]identify (ID responders in short answers) | ||
+ | +[no]trace (Trace delegation down from root) | ||
+ | +[no]dnssec (Request DNSSEC records) | ||
+ | +[no]nsid (Request Name Server ID) | ||
+ | +[no]sigchase (Chase DNSSEC signatures) | ||
+ | +trusted-key=#### (Trusted Key when chasing DNSSEC sigs) | ||
+ | +[no]topdown (Do DNSSEC validation top down mode) | ||
+ | +[no]multiline (Print records in an expanded format) | ||
+ | +[no]onesoa (AXFR prints only one soa record) | ||
+ | global d-opts and servers (before host name) affect all queries. | ||
+ | local d-opts and servers (after host name) affect only that lookup. | ||
+ | -h (print help and exit) | ||
+ | -v (print version and exit) | ||
+ | |||
= Liens utiles = | = Liens utiles = | ||
* [https://toolbox.googleapps.com/apps/dig/ toolbox.googleapps.com] Version en ligne de la commande dig | * [https://toolbox.googleapps.com/apps/dig/ toolbox.googleapps.com] Version en ligne de la commande dig | ||
Ligne 22 : | Ligne 114 : | ||
* [[mtr]] | * [[mtr]] | ||
* [[ping]] | * [[ping]] | ||
+ | |||
+ | = Commentaires = | ||
+ | {{#widget:DISQUS | ||
+ | |id=vulgumtechus | ||
+ | }} |
Version actuelle en date du 17 janvier 2021 à 00:58
Lien court vers cette page : https://vt.cx/dig QR code vers cette page : https://vt.cx/dig.qr
Présentation
Commande Linux de vérification des DNS
Utile
- dig -t txt _acme-challenge.<domaine.tld> +short → recherche sur _acme-challenge dans enregistrements TXT du <domaine.tld>
dig NS <domaine.tld> dig @localhost NS <domaine.tld>
Commandes
liste des DNS sollicités → dig domaine.tld +trace voir les MX d'un domaine → dig mx domaine.tld +short IP d'un serveur (version courte) → dig domaine.tld +short liste des champs TXT (version courte) → dig domaine.tld txt +short liste des host names (version courte) → dig domaine.tld ns +short Usage: dig [@global-server] [domain] [q-type] [q-class] {q-opt} {global-d-opt} host [@local-server] {local-d-opt} [host [@local-server] {local-d-opt} [...]] Where domain is in the Domain Name System q-class is one of (in,hs,ch,...) [default: in] q-type is one of (a,any,mx,ns,soa,hinfo,axfr,txt,...) [default:a] (Use ixfr=version for type ixfr) q-opt is one of: -x dot-notation (shortcut for reverse lookups) -i (use IP6.INT for IPv6 reverse lookups) -f filename (batch mode) -b address[#port] (bind to source address/port) -p port (specify port number) -q name (specify query name) -t type (specify query type) -c class (specify query class) -k keyfile (specify tsig key file) -y [hmac:]name:key (specify named base64 tsig key) -4 (use IPv4 query transport only) -6 (use IPv6 query transport only) -m (enable memory usage debugging) d-opt is of the form +keyword[=value], where keyword is: +[no]vc (TCP mode) +[no]tcp (TCP mode, alternate syntax) +time=### (Set query timeout) [5] +tries=### (Set number of UDP attempts) [3] +retry=### (Set number of UDP retries) [2] +domain=### (Set default domainname) +bufsize=### (Set EDNS0 Max UDP packet size) +ndots=### (Set NDOTS value) +edns=### (Set EDNS version) +[no]search (Set whether to use searchlist) +[no]showsearch (Search with intermediate results) +[no]defname (Ditto) +[no]recurse (Recursive mode) +[no]ignore (Don't revert to TCP for TC responses.) +[no]fail (Don't try next server on SERVFAIL) +[no]besteffort (Try to parse even illegal messages) +[no]aaonly (Set AA flag in query (+[no]aaflag)) +[no]adflag (Set AD flag in query) +[no]cdflag (Set CD flag in query) +[no]cl (Control display of class in records) +[no]cmd (Control display of command line) +[no]comments (Control display of comment lines) +[no]question (Control display of question) +[no]answer (Control display of answer) +[no]authority (Control display of authority) +[no]additional (Control display of additional) +[no]stats (Control display of statistics) +[no]short (Disable everything except short form of answer) +[no]ttlid (Control display of ttls in records) +[no]all (Set or clear all display flags) +[no]qr (Print question before sending) +[no]nssearch (Search all authoritative nameservers) +[no]identify (ID responders in short answers) +[no]trace (Trace delegation down from root) +[no]dnssec (Request DNSSEC records) +[no]nsid (Request Name Server ID) +[no]sigchase (Chase DNSSEC signatures) +trusted-key=#### (Trusted Key when chasing DNSSEC sigs) +[no]topdown (Do DNSSEC validation top down mode) +[no]multiline (Print records in an expanded format) +[no]onesoa (AXFR prints only one soa record) global d-opts and servers (before host name) affect all queries. local d-opts and servers (after host name) affect only that lookup. -h (print help and exit) -v (print version and exit)
Liens utiles
- toolbox.googleapps.com Version en ligne de la commande dig
- kloth.net Version en ligne de la commande dig