{"id":2863,"date":"2026-01-18T09:51:15","date_gmt":"2026-01-18T08:51:15","guid":{"rendered":"https:\/\/artheodoc.fr\/?page_id=2863"},"modified":"2026-01-18T09:51:15","modified_gmt":"2026-01-18T08:51:15","slug":"commandes-shell-linux-pour-les-dns","status":"publish","type":"page","link":"https:\/\/artheodoc.fr\/index.php\/commandes-shell-linux-pour-les-dns\/","title":{"rendered":"Commandes Shell Linux pour les DNS"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Commandes Shell Linux pour les DNS&nbsp;: host et nslookup<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Les commandes <strong>host<\/strong> et <strong>nslookup<\/strong> sont des outils essentiels pour interroger les serveurs DNS sous Linux. Elles permettent de r\u00e9soudre des noms de domaine en adresses IP, de v\u00e9rifier les enregistrements DNS (A, MX, NS, TXT, etc.), et de diagnostiquer des probl\u00e8mes de r\u00e9solution DNS.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">La commande <strong>host<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Description<\/h3>\n\n\n\n<p><strong>host<\/strong> est un outil simple et efficace pour effectuer des requ\u00eates DNS. Il est souvent utilis\u00e9 pour&nbsp;:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>R\u00e9soudre un nom de domaine en adresse IP (et inversement).<\/li>\n\n\n\n<li>V\u00e9rifier les enregistrements DNS (A, MX, NS, TXT, etc.).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Syntaxe<\/h3>\n\n\n\n<p>host [options] nom_de_domaine [serveur_DNS]<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Exemples d&rsquo;utilisation<\/h3>\n\n\n\n<p>R\u00e9solution d\u2019un nom de domaine en IP<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">host google.com<\/pre>\n\n\n\n<p>R\u00e9solution inverse (IP vers nom de domaine)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">host 8.8.8.8<\/pre>\n\n\n\n<p>Interroger un serveur DNS sp\u00e9cifique<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">host google.com 8.8.8.8<\/pre>\n\n\n\n<p>Afficher tous les enregistrements DNS<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">host -a google.com<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">La commande <strong>nslookup<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Description<\/h3>\n\n\n\n<p><strong>nslookup<\/strong> est un outil plus interactif que <strong>host<\/strong>. Il permet de&nbsp;:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Effectuer des requ\u00eates DNS interactives ou non interactives.<\/li>\n\n\n\n<li>Changer de serveur DNS pendant une session.<\/li>\n\n\n\n<li>Obtenir des informations d\u00e9taill\u00e9es sur les enregistrements DNS.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Syntaxe<\/h3>\n\n\n\n<p>nslookup [options] [nom_de_domaine] [serveur_DNS]<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Exemples d&rsquo;utilisation<\/h3>\n\n\n\n<p>Mode interactif<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nslookup<br>> set type=A<br>> google.com<\/pre>\n\n\n\n<p>R\u00e9solution d\u2019un nom de domaine en IP<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nslookup google.com<\/pre>\n\n\n\n<p>Interroger un serveur DNS sp\u00e9cifique<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nslookup google.com 8.8.8.8<\/pre>\n\n\n\n<p>Afficher les enregistrements MX (serveurs de mail)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nslookup -type=MX google.com<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Comparaison&nbsp;: <strong>host<\/strong> vs <strong>nslookup<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Crit\u00e8re<\/th><th>host<\/th><th>nslookup<\/th><\/tr><tr><td>Simplicit\u00e9<\/td><td>Tr\u00e8s simple, syntaxe directe<\/td><td>Plus complexe, mode interactif<\/td><\/tr><tr><td>Interactivit\u00e9<\/td><td>Non interactive<\/td><td>Interactive ou non interactive<\/td><\/tr><tr><td>Options<\/td><td>Moins d\u2019options<\/td><td>Plus d\u2019options avanc\u00e9es<\/td><\/tr><tr><td>Utilisation<\/td><td>Scripts, automatisation<\/td><td>D\u00e9pannage, exploration manuelle<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Cas pratiques et d\u00e9pannage<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>V\u00e9rifier la propagation DNS<\/strong>\u00a0: Utilisez <strong>host<\/strong> ou <strong>nslookup<\/strong> pour v\u00e9rifier si un changement DNS est effectif.<\/li>\n\n\n\n<li><strong>Diagnostiquer des probl\u00e8mes de r\u00e9solution<\/strong>\u00a0: Comparez les r\u00e9sultats avec diff\u00e9rents serveurs DNS.<\/li>\n\n\n\n<li><strong>V\u00e9rifier les enregistrements TXT<\/strong> (pour SPF, DKIM, etc.)\u00a0:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">host -t TXT google.com<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Commandes Shell Linux pour les DNS&nbsp;: host et nslookup Introduction Les commandes host et nslookup sont des outils essentiels pour interroger les serveurs DNS sous Linux. Elles permettent de r\u00e9soudre des noms de domaine en adresses IP, de v\u00e9rifier les enregistrements DNS (A, MX, NS, TXT, etc.), et de diagnostiquer des probl\u00e8mes de r\u00e9solution DNS. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-2863","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/pages\/2863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/comments?post=2863"}],"version-history":[{"count":1,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/pages\/2863\/revisions"}],"predecessor-version":[{"id":2864,"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/pages\/2863\/revisions\/2864"}],"wp:attachment":[{"href":"https:\/\/artheodoc.fr\/index.php\/wp-json\/wp\/v2\/media?parent=2863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}