Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
elearning:workbooks:lpic:22:450:l101 [2022/11/01 09:51] – admin | elearning:workbooks:lpic:22:450:l101 [2022/11/21 09:34] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 29: | Ligne 29: | ||
* 3.1 - La clef rndc | * 3.1 - La clef rndc | ||
* 3.2 - Les fichiers de configuration | * 3.2 - Les fichiers de configuration | ||
+ | * Caractéristiques avancées de Bind | ||
+ | * DNSSEC | ||
+ | * TSIG | ||
=====Présentation===== | =====Présentation===== | ||
Ligne 38: | Ligne 41: | ||
Lorsque un ordinateur souhaite communiquer avec un autre par le biais de son nom, par exemple avec www.i2tch.com, | Lorsque un ordinateur souhaite communiquer avec un autre par le biais de son nom, par exemple avec www.i2tch.com, | ||
- | Ce processus tente d' | + | Ce processus tente d' |
Si cette tentative échoue, le serveur DNS cherche le serveur de domaine pour le **TLD** ( Top Level Domain ) dans son cache afin de lui demander l' | Si cette tentative échoue, le serveur DNS cherche le serveur de domaine pour le **TLD** ( Top Level Domain ) dans son cache afin de lui demander l' | ||
Ligne 58: | Ligne 61: | ||
Afin d' | Afin d' | ||
- | * **FQDN** - centos8.i2tch.loc | + | * **FQDN** - centos7.fenestros.loc |
- | * **Adresse IP** - 10.0.2.15 | + | * **Adresse IP** - 10.0.2.51 |
- | Vérifiez que votre fichier / | + | Modifiez |
- | <file bash hosts> | + | <code> |
- | 10.0.2.15 centos.fenestros.loc | + | [root@centos7 ~]# vi / |
- | 127.0.0.1 localhost.localdomain localhost | + | [root@centos7 ~]# cat /etc/hosts |
- | ::1 centos localhost6.localdomain6 localhost6 | + | 10.0.2.51 |
- | </file> | + | 127.0.0.1 |
+ | ::1 | ||
+ | </code> | ||
<WRAP center round important 60%> | <WRAP center round important 60%> | ||
Ligne 78: | Ligne 83: | ||
< | < | ||
- | [root@centos6 | + | [root@centos7 |
- | Loaded plugins: fastestmirror, | + | |
- | Loading mirror speeds from cached hostfile | + | |
- | * base: mirrors.ircam.fr | + | |
- | * extras: mirrors.ircam.fr | + | |
- | * updates: mirrors.ircam.fr | + | |
- | Setting up Install Process | + | |
- | + | ||
- | Resolving Dependencies | + | |
- | --> Running transaction check | + | |
- | ---> Package bind.i686 32: | + | |
- | --> Processing Dependency: bind-libs = 32: | + | |
- | --> Processing Dependency: libdns.so.69 for package: 32: | + | |
- | --> Processing Dependency: libisccfg.so.62 for package: 32: | + | |
- | --> Processing Dependency: libisc.so.62 for package: 32: | + | |
- | --> Running transaction check | + | |
- | --> Processing Dependency: libdns.so.64 for package: 32: | + | |
- | --> Processing Dependency: libisc.so.60 for package: 32: | + | |
- | --> Processing Dependency: libisccfg.so.60 for package: 32: | + | |
- | ---> Package bind-libs.i686 32: | + | |
- | --> Running transaction check | + | |
- | ---> Package bind-utils.i686 32: | + | |
- | --> Finished Dependency Resolution | + | |
- | + | ||
- | Dependencies Resolved | + | |
- | + | ||
- | ================================================================================ | + | |
- | | + | |
- | ================================================================================ | + | |
- | Installing: | + | |
- | | + | |
- | Updating for dependencies: | + | |
- | | + | |
- | | + | |
- | + | ||
- | Transaction Summary | + | |
- | ================================================================================ | + | |
- | Install | + | |
- | Upgrade | + | |
- | + | ||
- | Total download size: 4.9 M | + | |
- | Is this ok [y/N]: y | + | |
- | Downloading Packages: | + | |
- | (1/3): bind-9.7.3-8.P3.el6_2.2.i686.rpm | + | |
- | (2/3): bind-libs-9.7.3-8.P3.el6_2.2.i686.rpm | + | |
- | (3/3): bind-utils-9.7.3-8.P3.el6_2.2.i686.rpm | + | |
- | -------------------------------------------------------------------------------- | + | |
- | Total 1.2 MB/s | 4.9 MB | + | |
- | Running rpm_check_debug | + | |
- | Running Transaction Test | + | |
- | Transaction Test Succeeded | + | |
- | Running Transaction | + | |
- | Updating | + | |
- | Updating | + | |
- | Installing | + | |
- | Cleanup | + | |
- | Cleanup | + | |
- | + | ||
- | Installed: | + | |
- | bind.i686 32: | + | |
- | + | ||
- | Dependency Updated: | + | |
- | bind-libs.i686 32: | + | |
- | + | ||
- | Complete! | + | |
</ | </ | ||
- | Configurez | + | Activez |
< | < | ||
- | [root@centos6 | + | [root@centos7 |
- | [root@centos6 | + | ● named.service |
- | named 0:arrêt 1: | + | |
+ | | ||
+ | [root@centos7 | ||
+ | Created symlink from / | ||
+ | [root@centos7 ~]# systemctl status | ||
+ | ● named.service - Berkeley Internet Name Domain (DNS) | ||
+ | | ||
+ | | ||
</ | </ | ||
- | Les options de cette commande sont : | + | <WRAP center round important 60%> |
+ | **Important** | ||
+ | </ | ||
- | < | + | =====LAB |
- | [root@centos6 ~]# named --help | + | |
- | usage: named [-4|-6] [-c conffile] [-d debuglevel] [-E engine] [-f|-g] | + | |
- | [-n number_of_cpus] [-p port] [-s] [-t chrootdir] [-u username] | + | |
- | [-m {usage|trace|record|size|mctx}] | + | |
- | named: unknown option ' | + | |
- | </ | + | |
- | =====LAB #2 - Les fichiers | + | Six fichiers |
* / | * / | ||
Ligne 170: | Ligne 114: | ||
* / | * / | ||
* / | * / | ||
- | * / | + | * / |
====2.1 - named.ca==== | ====2.1 - named.ca==== | ||
Ligne 179: | Ligne 123: | ||
< | < | ||
- | [root@centos6 | + | [root@centos7 |
- | </code> | + | |
+ | [root@centos7 ~]# cat /var/ | ||
- | <file text named.ca> | + | ; <<>> |
- | ; <<>> | + | |
; (2 servers found) | ; (2 servers found) | ||
;; global options: +cmd | ;; global options: +cmd | ||
;; Got answer: | ;; Got answer: | ||
- | ;; ->> | + | ;; ->> |
- | ;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: | + | ;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: |
;; WARNING: recursion requested but not available | ;; WARNING: recursion requested but not available | ||
+ | ;; OPT PSEUDOSECTION: | ||
+ | ; EDNS: version: 0, flags:; udp: 4096 | ||
;; QUESTION SECTION: | ;; QUESTION SECTION: | ||
- | ;. IN NS | + | ;. IN NS |
;; ANSWER SECTION: | ;; ANSWER SECTION: | ||
- | . 518400 IN NS f.root-servers.net. | + | . |
- | . 518400 IN NS a.root-servers.net. | + | . |
- | . 518400 IN NS j.root-servers.net. | + | . |
- | . 518400 IN NS d.root-servers.net. | + | . |
- | . 518400 IN NS m.root-servers.net. | + | . |
- | . 518400 IN NS i.root-servers.net. | + | . |
- | . 518400 IN NS g.root-servers.net. | + | . |
- | . 518400 IN NS e.root-servers.net. | + | . |
- | . 518400 IN NS l.root-servers.net. | + | . |
- | . 518400 IN NS c.root-servers.net. | + | . |
- | . 518400 IN NS b.root-servers.net. | + | . |
- | . 518400 IN NS k.root-servers.net. | + | . |
- | . 518400 IN NS h.root-servers.net. | + | . |
;; ADDITIONAL SECTION: | ;; ADDITIONAL SECTION: | ||
- | a.root-servers.net. 3600000 IN A 198.41.0.4 | + | e.root-servers.net. |
- | a.root-servers.net. 3600000 IN AAAA 2001: | + | e.root-servers.net. |
- | b.root-servers.net. 3600000 IN A 192.228.79.201 | + | h.root-servers.net. |
- | c.root-servers.net. 3600000 IN A 192.33.4.12 | + | h.root-servers.net. |
- | d.root-servers.net. 3600000 IN A 128.8.10.90 | + | l.root-servers.net. |
- | d.root-servers.net. 3600000 IN AAAA 2001: | + | l.root-servers.net. |
- | e.root-servers.net. 3600000 IN A 192.203.230.10 | + | i.root-servers.net. |
- | f.root-servers.net. 3600000 IN A 192.5.5.241 | + | i.root-servers.net. |
- | f.root-servers.net. 3600000 IN AAAA 2001: | + | a.root-servers.net. |
- | g.root-servers.net. 3600000 IN A 192.112.36.4 | + | a.root-servers.net. |
- | h.root-servers.net. 3600000 IN A 128.63.2.53 | + | d.root-servers.net. |
- | h.root-servers.net. 3600000 IN AAAA 2001: | + | d.root-servers.net. |
- | i.root-servers.net. 3600000 IN A 192.36.148.17 | + | c.root-servers.net. |
- | i.root-servers.net. 3600000 IN AAAA 2001: | + | c.root-servers.net. |
+ | b.root-servers.net. | ||
+ | b.root-servers.net. | ||
+ | j.root-servers.net. | ||
+ | j.root-servers.net. | ||
+ | k.root-servers.net. | ||
+ | k.root-servers.net. | ||
+ | g.root-servers.net. | ||
+ | g.root-servers.net. | ||
+ | m.root-servers.net. | ||
+ | m.root-servers.net. | ||
+ | f.root-servers.net. | ||
+ | f.root-servers.net. | ||
- | ;; Query time: 149 msec | + | ;; Query time: 2 msec |
;; SERVER: 198.41.0.4# | ;; SERVER: 198.41.0.4# | ||
- | ;; WHEN: Wed May 30 13:28:45 2012 | + | ;; WHEN: Tue Nov 01 16:59:11 CET 2022 |
- | ;; MSG SIZE rcvd: 512 | + | ;; MSG SIZE rcvd: 811 |
- | + | ||
- | </ | + | |
- | + | ||
- | Le fichier named.ca doit appartenir à l' | + | |
- | + | ||
- | < | + | |
- | [root@centos6 ~]# ls -l / | + | |
- | -rw-r--r--. 1 root root 1666 30 mai 13:28 / | + | |
</ | </ | ||
Ligne 243: | Ligne 193: | ||
Le fichier de configuration principal du serveur DNS Bind est **/ | Le fichier de configuration principal du serveur DNS Bind est **/ | ||
- | <file text named.conf> | + | <code> |
+ | [root@centos7 ~]# cat /etc/named.conf | ||
// | // | ||
// named.conf | // named.conf | ||
Ligne 252: | Ligne 203: | ||
// See / | // See / | ||
// | // | ||
+ | // See the BIND Administrator' | ||
+ | // configuration located in / | ||
options { | options { | ||
- | listen-on port 53 { 127.0.0.1; }; | + | |
- | listen-on-v6 port 53 { ::1; }; | + | listen-on-v6 port 53 { ::1; }; |
- | directory | + | directory |
- | dump-file | + | dump-file |
statistics-file "/ | statistics-file "/ | ||
memstatistics-file "/ | memstatistics-file "/ | ||
- | allow-query | + | recursing-file |
- | recursion yes; | + | secroots-file |
+ | | ||
- | dnssec-enable | + | /* |
- | dnssec-validation yes; | + | - If you are building an AUTHORITATIVE DNS server, do NOT enable |
- | dnssec-lookaside auto; | + | |
+ | recursion. | ||
+ | - If your recursive DNS server has a public IP address, you MUST enable access | ||
+ | | ||
+ | cause your server to become part of large scale DNS amplification | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | recursion yes; | ||
- | /* Path to ISC DLV key */ | + | dnssec-enable yes; |
- | bindkeys-file "/ | + | dnssec-validation yes; |
+ | |||
+ | | ||
+ | bindkeys-file "/ | ||
+ | |||
+ | managed-keys-directory "/ | ||
+ | |||
+ | pid-file "/ | ||
+ | session-keyfile "/ | ||
}; | }; | ||
Ligne 279: | Ligne 249: | ||
zone " | zone " | ||
- | type hint; | + | |
- | file " | + | file " |
}; | }; | ||
include "/ | include "/ | ||
+ | include "/ | ||
+ | </ | ||
- | </file> | + | <WRAP center round important 60%> |
+ | **Important** : Notez que pour désactiver les requêtes récursives, | ||
+ | </WRAP> | ||
Dans ce fichier on trouve des sections ayant la forme suivante : | Dans ce fichier on trouve des sections ayant la forme suivante : | ||
Ligne 301: | Ligne 275: | ||
... | ... | ||
options { | options { | ||
- | listen-on port 53 { 127.0.0.1; }; | + | |
- | listen-on-v6 port 53 { ::1; }; | + | listen-on-v6 port 53 { ::1; }; |
- | directory | + | directory |
- | dump-file | + | dump-file |
statistics-file "/ | statistics-file "/ | ||
memstatistics-file "/ | memstatistics-file "/ | ||
- | allow-query | + | recursing-file |
- | recursion yes; | + | secroots-file |
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | dnssec-enable yes; | ||
+ | dnssec-validation yes; | ||
+ | |||
+ | bindkeys-file "/ | ||
- | dnssec-enable yes; | + | managed-keys-directory "/ |
- | dnssec-validation yes; | + | |
- | dnssec-lookaside auto; | + | |
- | /* Path to ISC DLV key */ | + | pid-file "/run/named/ |
- | bindkeys-file "/etc/named.iscdlv.key"; | + | |
}; | }; | ||
... | ... | ||
Ligne 334: | Ligne 314: | ||
Modifiez donc la section **options** de votre fichier **/ | Modifiez donc la section **options** de votre fichier **/ | ||
- | <file> | + | <code> |
+ | [root@centos7 ~]# vi / | ||
+ | [root@centos7 ~]# cat / | ||
+ | ... | ||
options { | options { | ||
listen-on port 53 { 127.0.0.1; }; | listen-on port 53 { 127.0.0.1; }; | ||
Ligne 341: | Ligne 324: | ||
dump-file | dump-file | ||
statistics-file "/ | statistics-file "/ | ||
- | memstatistics-file "/ | + | memstatistics-file "/ |
+ | recursing-file | ||
+ | secroots-file | ||
allow-query { | allow-query { | ||
localhost; | localhost; | ||
10.0.2.0/ | 10.0.2.0/ | ||
}; | }; | ||
- | | + | |
- | + | | |
dnssec-enable yes; | dnssec-enable yes; | ||
dnssec-validation yes; | dnssec-validation yes; | ||
- | dnssec-lookaside auto; | ||
- | /* Path to ISC DLV key */ | + | |
- | | + | |
+ | managed-keys-directory "/var/ | ||
+ | |||
+ | | ||
+ | session-keyfile "/ | ||
}; | }; | ||
... | ... | ||
- | </file> | + | </code> |
<WRAP center round important 60%> | <WRAP center round important 60%> | ||
- | **Important** - Dans l' | + | **Important** - Dans l' |
</ | </ | ||
+ | |||
+ | Dernièrement, | ||
+ | |||
+ | < | ||
+ | acl mycompany { | ||
+ | 10.0.2.0/ | ||
+ | }; | ||
+ | |||
+ | options { | ||
+ | allow-query { mycompany; }; | ||
+ | }; | ||
+ | </ | ||
====2.3 - named.rfc1912.zones==== | ====2.3 - named.rfc1912.zones==== | ||
- | Dans le fichier **/ | + | Dans le fichier **/ |
- | Le fichier | + | Consultez ce fichier : |
- | <file text named.rfc1912.zones> | + | <code> |
+ | [root@centos7 ~]# cat /etc/named.rfc1912.zones | ||
// named.rfc1912.zones: | // named.rfc1912.zones: | ||
// | // | ||
Ligne 382: | Ligne 384: | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
- | + | </code> | |
- | </file> | + | |
===La Valeur Type=== | ===La Valeur Type=== | ||
Ligne 449: | Ligne 450: | ||
</ | </ | ||
- | La section de zone fait corréspondre | + | La section de zone fait correspondre |
< | < | ||
Ligne 455: | Ligne 456: | ||
</ | </ | ||
- | Par exemple dans le fichier ci-dessus nous trouvons les trois sections suivantes : | + | Par exemple dans le fichier ci-dessus nous trouvons les cinq sections suivantes : |
< | < | ||
... | ... | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { none; }; | ||
+ | }; | ||
+ | |||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
- | ... | + | |
+ | zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { none; }; | ||
+ | }; | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
- | |||
</ | </ | ||
Ligne 483: | Ligne 495: | ||
</ | </ | ||
- | Afin de configurer notre serveur correctement donc, il est necéssaire | + | Afin de configurer notre serveur correctement donc, il est nécessaire |
- | * La zone correspondant à notre domaine, ici appelée " | + | La zone correspondant à notre domaine, ici appelée " |
< | < | ||
Ligne 497: | Ligne 509: | ||
</ | </ | ||
- | * La zone à notre domaine mais dans le sens inverse. A savoir le fichier **db.2.0.10.hosts** qui fait correspondre notre adresse IP avec le nom de la machine. | + | La zone à notre domaine mais dans le sens inverse. A savoir le fichier **db.2.0.10.hosts** qui fait correspondre notre adresse IP avec le nom de la machine. |
< | < | ||
Ligne 511: | Ligne 523: | ||
Ajoutez donc ces deux sections au fichier **/ | Ajoutez donc ces deux sections au fichier **/ | ||
- | <file text named.rfc1912.zones> | + | <code> |
+ | [root@centos7 ~]# vi / | ||
+ | |||
+ | [root@centos7 ~]# cat /etc/named.rfc1912.zones | ||
// named.rfc1912.zones: | // named.rfc1912.zones: | ||
// | // | ||
Ligne 525: | Ligne 540: | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
zone " | zone " | ||
- | type master; | + | |
- | file " | + | file " |
- | allow-update { none; }; | + | allow-update { none; }; |
}; | }; | ||
Ligne 565: | Ligne 580: | ||
forwarders { }; | forwarders { }; | ||
}; | }; | ||
- | </file> | + | </code> |
====2.4 - Les fichiers de zone==== | ====2.4 - Les fichiers de zone==== | ||
Ligne 580: | Ligne 595: | ||
* La durée de vie en cache de cet enregistrement. | * La durée de vie en cache de cet enregistrement. | ||
* **classe** | * **classe** | ||
- | * Le réseau de transport utilisé. Dans notre cas, le réseau est du TCP. La valeur est donc IN. | + | * Le réseau de transport utilisé. Dans notre cas, Internet. La valeur est donc IN. |
* **type** | * **type** | ||
* Le type d' | * Le type d' | ||
* SOA - Start of Authority - se trouve au début du fichier et contient des informations générales | * SOA - Start of Authority - se trouve au début du fichier et contient des informations générales | ||
* NS - Name Server | * NS - Name Server | ||
- | * A - Address - indique une résolution de nom vers une adresse IP. Ne se trouve que dans les fichiers **.hosts** | + | * A - Address |
+ | * AAAA - Address IPv6 - indique une résolution de nom vers une adresse IP. Ne se trouve que dans les fichiers **.hosts** | ||
* PTR - %%PoinTeR%% - indique une résolution d'une adresse IP vers un nom. Ne se trouve que dans les fichiers inversés. | * PTR - %%PoinTeR%% - indique une résolution d'une adresse IP vers un nom. Ne se trouve que dans les fichiers inversés. | ||
* MX - Mail eXchange - le nom d'un serveur de mail. | * MX - Mail eXchange - le nom d'un serveur de mail. | ||
* CNAME - Canonical Name - un alias d'une machine. | * CNAME - Canonical Name - un alias d'une machine. | ||
- | * HINFO - Hardware Info - fournit des informations sur le matériel de la machine | + | * HINFO - Hardware Info - fournit des informations sur le matériel de la machine |
+ | * TXT - Un enregistrement contenant des informations textuelles pour des sources extérieures à votre domaine, par exemple : | ||
+ | * Vérification de la propriété du domaine | ||
+ | * Implémentation du **Sender Policy Framework** (SPF) | ||
+ | * Enregistrements **DomainKeys Identified Mail** (DKIM) pour vérifier l' | ||
+ | * **Zero-configuration networking DNS-based service discovery** | ||
+ | * Politiques de **Domain-based Message Authentication, | ||
* **donnée** | * **donnée** | ||
* La donnée de la ressource: | * La donnée de la ressource: | ||
Ligne 597: | Ligne 619: | ||
===Le fichier db.fenestros.loc.hosts=== | ===Le fichier db.fenestros.loc.hosts=== | ||
- | Ce fichier | + | Ce fichier |
- | <file text db.fenestros.loc.hosts> | + | <code> |
+ | [root@centos7 ~]# vi / | ||
+ | [root@centos7 ~]# cat / | ||
$TTL 3D | $TTL 3D | ||
- | @ | + | @ |
- | 2012120301 | + | 2022110101 |
| | ||
| | ||
| | ||
| | ||
- | | + | |
localhost | localhost | ||
- | dnsmaster | + | dnsmaster |
- | centos.fenestros.loc. | + | centos7.fenestros.loc. |
- | ftp IN CNAME centos.fenestros.loc. | + | ftp IN CNAME centos7.fenestros.loc. |
- | www IN CNAME centos.fenestros.loc. | + | www IN CNAME centos7.fenestros.loc. |
- | mail IN CNAME centos.fenestros.loc. | + | mail IN CNAME centos7.fenestros.loc. |
- | news IN CNAME centos.fenestros.loc. | + | news IN CNAME centos7.fenestros.loc. |
- | </file> | + | </code> |
La première ligne de ce fichier commence par une ligne semblable à celle-ci: | La première ligne de ce fichier commence par une ligne semblable à celle-ci: | ||
Ligne 629: | Ligne 653: | ||
< | < | ||
- | @ | + | @ |
</ | </ | ||
- | Le caractère | + | <WRAP center round important 60%> |
+ | **Important** - Notez le point à la fin de chaque | ||
+ | </WRAP> | ||
- | <box 95% blue | **Extrait | + | Le caractère |
< | < | ||
+ | ... | ||
zone " | zone " | ||
type master; | type master; | ||
Ligne 642: | Ligne 669: | ||
forwarders { }; | forwarders { }; | ||
}; | }; | ||
+ | ... | ||
</ | </ | ||
- | </ | + | **Le numéro de série** doit être modifié chaque fois que le fichier soit changé. Il faut noter que dans le cas de plusieurs changements dans la même journée il est nécessaire |
- | + | ||
- | <WRAP center round important 60%> | + | |
- | **Important** - Notez le point à la fin de chaque nom de domaine. Notez bien le remplacement du caractère @ dans l' | + | |
- | </ | + | |
- | + | ||
- | **Le numéro de série** doit être modifié chaque fois que le fichier soit changé. Il faut noter que dans le cas de plusieurs changements dans la même journée il est necessaire | + | |
< | < | ||
- | 2012120301 | + | 2022110101 |
</ | </ | ||
Ligne 683: | Ligne 705: | ||
< | < | ||
- | IN NS centos.fenestros.loc. | + | IN NS centos7.fenestros.loc. |
</ | </ | ||
Ligne 694: | Ligne 716: | ||
< | < | ||
- | localhost | + | localhost |
- | centos.fenestros.loc. | + | centos7.fenestros.loc. |
</ | </ | ||
Ligne 701: | Ligne 723: | ||
< | < | ||
- | dnsmaster | + | dnsmaster |
</ | </ | ||
Ligne 707: | Ligne 729: | ||
< | < | ||
- | ftp IN CNAME centos.fenestros.loc. | + | ftp IN CNAME centos7.fenestros.loc. |
- | www IN CNAME centos.fenestros.loc. | + | www IN CNAME centos7.fenestros.loc. |
- | mail IN CNAME centos.fenestros.loc. | + | mail IN CNAME centos7.fenestros.loc. |
- | news IN CNAME centos.fenestros.loc. | + | news IN CNAME centos7.fenestros.loc. |
</ | </ | ||
===Le fichier db.2.0.10.hosts=== | ===Le fichier db.2.0.10.hosts=== | ||
- | Ce fichier | + | Ce fichier |
- | <file text db.2.0.10.hosts> | + | <code> |
+ | [root@centos7 ~]# vi / | ||
+ | |||
+ | [root@centos7 ~]# cat / | ||
$TTL 3D | $TTL 3D | ||
- | @ | + | @ |
- | | + | |
10800 ; Refresh | 10800 ; Refresh | ||
3600 ; Retry | 3600 ; Retry | ||
604800 | 604800 | ||
86400) ; Minimum TTL | 86400) ; Minimum TTL | ||
- | NS | + | NS |
- | 15 IN PTR centos.fenestros.loc. | + | 51 IN PTR centos7.fenestros.loc. |
- | </file> | + | </code> |
Modifiez maintenant les permissions sur les fichiers de configuration : | Modifiez maintenant les permissions sur les fichiers de configuration : | ||
< | < | ||
- | [root@centos6 named]# chmod g+w / | + | [root@centos7 ~]# chmod g+w / |
- | [root@centos6 named]# ls -l / | + | |
- | -rw-rw-r--. 1 root root 350 30 mai 15:52 / | + | [root@centos7 ~]# ls -l / |
- | -rw-rw-r--. 1 root root 610 30 mai 15:51 / | + | -rw-rw-r--. 1 root root 355 Nov 1 17:29 / |
+ | -rw-rw-r--. 1 root root 619 Nov 1 17:22 / | ||
</ | </ | ||
Ligne 743: | Ligne 768: | ||
Modifiez maintenant le fichier **/ | Modifiez maintenant le fichier **/ | ||
- | <file text resolv.conf> | + | <code> |
+ | [root@centos7 ~]# nmcli c mod ip_fixe +ipv4.dns 127.0.0.1 | ||
+ | |||
+ | [root@centos7 ~]# nmcli c mod ip_fixe -ipv4.dns 8.8.8.8 | ||
+ | |||
+ | [root@centos7 ~]# nmcli c up ip_fixe | ||
+ | Connection successfully activated (D-Bus active path: / | ||
+ | |||
+ | [root@centos7 ~]# cat /etc/resolv.conf | ||
+ | # Generated by NetworkManager | ||
search fenestros.loc | search fenestros.loc | ||
nameserver 127.0.0.1 | nameserver 127.0.0.1 | ||
- | </file> | + | </code> |
Dernièrement, | Dernièrement, | ||
< | < | ||
- | [root@centos6 | + | [root@centos7 ~]# systemctl start named |
- | Démarrage de named : [ OK ] | + | [root@centos7 ~]# systemctl status named |
+ | ● named.service | ||
+ | | ||
+ | Active: active (running) since Tue 2022-11-01 17:41:33 CET; 3s ago | ||
+ | Process: 24441 ExecStart=/ | ||
+ | Process: 24439 ExecStartPre=/ | ||
+ | Main PID: 24443 (named) | ||
+ | | ||
+ | | ||
+ | |||
+ | Nov 01 17:41:33 centos7.fenestros.loc named[24443]: | ||
+ | Nov 01 17:41:33 centos7.fenestros.loc named[24443]: | ||
+ | Nov 01 17:41:33 centos7.fenestros.loc named[24443]: | ||
+ | Nov 01 17:41:33 centos7.fenestros.loc named[24443]: | ||
+ | Nov 01 17:41:33 centos7.fenestros.loc named[24443]: | ||
+ | Nov 01 17:41:33 centos7.fenestros.loc named[24443]: | ||
+ | Nov 01 17:41:33 centos7.fenestros.loc named[24443]: | ||
+ | Nov 01 17:41:33 centos7.fenestros.loc named[24443]: | ||
+ | Nov 01 17:41:33 centos7.fenestros.loc named[24443]: | ||
+ | Nov 01 17:41:34 centos7.fenestros.loc named[24443]: | ||
</ | </ | ||
Ligne 758: | Ligne 811: | ||
< | < | ||
- | [root@centos6 | + | [root@centos7 |
- | ; <<>> | + | ; <<>> |
;; global options: +cmd | ;; global options: +cmd | ||
;; Got answer: | ;; Got answer: | ||
- | ;; ->> | + | ;; ->> |
- | ;; flags: qr rd ra; QUERY: 1, ANSWER: | + | ;; flags: qr rd ra; QUERY: 1, ANSWER: |
+ | ;; OPT PSEUDOSECTION: | ||
+ | ; EDNS: version: 0, flags:; udp: 4096 | ||
;; QUESTION SECTION: | ;; QUESTION SECTION: | ||
- | ;www.linuxelearning.com. IN A | + | ;www.i2tch.com. |
;; ANSWER SECTION: | ;; ANSWER SECTION: | ||
- | www.linuxelearning.com. 39795 IN CNAME linuxelearning.com. | + | www.i2tch.com. |
- | linuxelearning.com. 60 IN A 212.198.31.61 | + | |
;; AUTHORITY SECTION: | ;; AUTHORITY SECTION: | ||
- | com. 172599 IN NS k.gtld-servers.net. | + | i2tch.com. |
- | com. 172599 IN NS m.gtld-servers.net. | + | i2tch.com. |
- | com. 172599 IN NS l.gtld-servers.net. | + | i2tch.com. |
- | com. 172599 IN NS b.gtld-servers.net. | + | i2tch.com. |
- | com. 172599 IN NS d.gtld-servers.net. | + | |
- | com. 172599 IN NS a.gtld-servers.net. | + | |
- | com. 172599 IN NS f.gtld-servers.net. | + | |
- | com. 172599 IN NS i.gtld-servers.net. | + | |
- | com. 172599 IN NS e.gtld-servers.net. | + | |
- | com. 172599 IN NS c.gtld-servers.net. | + | |
- | com. 172599 IN NS j.gtld-servers.net. | + | |
- | com. 172599 IN NS h.gtld-servers.net. | + | |
- | com. 172599 IN NS g.gtld-servers.net. | + | |
- | ;; Query time: 38 msec | + | ;; ADDITIONAL SECTION: |
+ | ns1026.ui-dns.com. | ||
+ | ns1026.ui-dns.com. | ||
+ | |||
+ | ;; Query time: 0 msec | ||
;; SERVER: 127.0.0.1# | ;; SERVER: 127.0.0.1# | ||
- | ;; WHEN: Wed May 30 17:09:25 2012 | + | ;; WHEN: Tue Nov 01 17:42:27 CET 2022 |
- | ;; MSG SIZE rcvd: 294 | + | ;; MSG SIZE rcvd: 222 |
+ | </ | ||
- | [root@centos6 | + | < |
+ | [root@centos7 | ||
- | ; <<>> | + | ; <<>> |
;; global options: +cmd | ;; global options: +cmd | ||
;; Got answer: | ;; Got answer: | ||
- | ;; ->> | + | ;; ->> |
- | ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: | + | ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: |
+ | ;; OPT PSEUDOSECTION: | ||
+ | ; EDNS: version: 0, flags:; udp: 4096 | ||
;; QUESTION SECTION: | ;; QUESTION SECTION: | ||
- | ;centos.fenestros.loc. IN A | + | ;centos7.fenestros.loc. |
;; ANSWER SECTION: | ;; ANSWER SECTION: | ||
- | centos.fenestros.loc. 259200 IN A 10.0.2.15 | + | centos7.fenestros.loc. |
;; AUTHORITY SECTION: | ;; AUTHORITY SECTION: | ||
- | fenestros.loc. 259200 IN NS centos.fenestros.loc. | + | fenestros.loc. |
- | ;; Query time: 3 msec | + | ;; Query time: 0 msec |
;; SERVER: 127.0.0.1# | ;; SERVER: 127.0.0.1# | ||
- | ;; WHEN: Wed May 30 17:10:05 2012 | + | ;; WHEN: Tue Nov 01 17:44:08 CET 2022 |
- | ;; MSG SIZE rcvd: 68 | + | ;; MSG SIZE rcvd: 80 |
+ | </ | ||
+ | < | ||
+ | [root@centos7 ~]# dig -x 10.0.2.51 | ||
- | [root@centos6 ~]# dig -x 10.0.2.15 | + | ; <<>> |
- | + | ||
- | ; <<>> | + | |
;; global options: +cmd | ;; global options: +cmd | ||
;; Got answer: | ;; Got answer: | ||
- | ;; ->> | + | ;; ->> |
- | ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: | + | ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: |
+ | ;; OPT PSEUDOSECTION: | ||
+ | ; EDNS: version: 0, flags:; udp: 4096 | ||
;; QUESTION SECTION: | ;; QUESTION SECTION: | ||
- | ;15.2.0.10.in-addr.arpa. IN PTR | + | ;51.2.0.10.in-addr.arpa. |
;; ANSWER SECTION: | ;; ANSWER SECTION: | ||
- | 15.2.0.10.in-addr.arpa. 259200 IN PTR centos.fenestros.loc. | + | 51.2.0.10.in-addr.arpa. 259200 |
;; AUTHORITY SECTION: | ;; AUTHORITY SECTION: | ||
- | 2.0.10.in-addr.arpa. 259200 IN NS centos.fenestros.loc. | + | 2.0.10.in-addr.arpa. |
;; ADDITIONAL SECTION: | ;; ADDITIONAL SECTION: | ||
- | centos.fenestros.loc. 259200 IN A 10.0.2.15 | + | centos7.fenestros.loc. |
;; Query time: 0 msec | ;; Query time: 0 msec | ||
;; SERVER: 127.0.0.1# | ;; SERVER: 127.0.0.1# | ||
- | ;; WHEN: Wed May 30 17:10:50 2012 | + | ;; WHEN: Tue Nov 01 17:45:05 CET 2022 |
- | ;; MSG SIZE rcvd: 104 | + | ;; MSG SIZE rcvd: 116 |
</ | </ | ||
Ligne 846: | Ligne 901: | ||
**Important** - Notez l' | **Important** - Notez l' | ||
</ | </ | ||
+ | |||
+ | < | ||
+ | [root@centos7 ~]# host ittraining.team | ||
+ | ittraining.team has address 109.228.56.52 | ||
+ | ittraining.team mail is handled by 10 aspmx3.googlemail.com. | ||
+ | ittraining.team mail is handled by 5 alt2.aspmx.l.google.com. | ||
+ | ittraining.team mail is handled by 5 aspmx.l.google.com. | ||
+ | ittraining.team mail is handled by 10 mx.zoho.com. | ||
+ | ittraining.team mail is handled by 10 aspmx2.googlemail.com. | ||
+ | ittraining.team mail is handled by 1 alt1.aspmx.l.google.com. | ||
+ | </ | ||
====LAB #3 - L' | ====LAB #3 - L' | ||
- | L' | + | L' |
===3.1 - La clef rndc=== | ===3.1 - La clef rndc=== | ||
Ligne 856: | Ligne 922: | ||
< | < | ||
- | [root@centos6 | + | [root@centos7 |
wrote key file "/ | wrote key file "/ | ||
</ | </ | ||
Ligne 862: | Ligne 928: | ||
A l' | A l' | ||
- | <file text rndc.key> | + | <code> |
+ | [root@centos7 ~]# cat /root/rndc.key | ||
key " | key " | ||
- | algorithm hmac-md5; | + | |
- | secret "NuPP8qFNPZ7m0rWPPahRtA=="; | + | secret "F5/ |
}; | }; | ||
- | </file> | + | </code> |
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **Important** - Notez le format de ce fichier. | ||
+ | </WRAP> | ||
===3.2 - Les fichiers de configuration=== | ===3.2 - Les fichiers de configuration=== | ||
Ligne 873: | Ligne 944: | ||
La clef doit être référencée dans le fichier **/ | La clef doit être référencée dans le fichier **/ | ||
- | <file text named.conf> | + | <code> |
+ | [root@centos7 ~]# vi / | ||
+ | [root@centos7 ~]# cat /etc/named.conf | ||
// | // | ||
// named.conf | // named.conf | ||
Ligne 882: | Ligne 955: | ||
// See / | // See / | ||
// | // | ||
+ | // See the BIND Administrator' | ||
+ | // configuration located in / | ||
options { | options { | ||
- | listen-on port 53 { 127.0.0.1; }; | + | |
- | listen-on-v6 port 53 { ::1; }; | + | listen-on-v6 port 53 { ::1; }; |
- | directory | + | directory |
- | dump-file | + | dump-file |
statistics-file "/ | statistics-file "/ | ||
memstatistics-file "/ | memstatistics-file "/ | ||
- | allow-query { | + | recursing-file |
- | localhost; | + | secroots-file |
- | 10.0.2.0/ | + | |
- | }; | + | localhost; |
- | forwarders { 10.0.2.3; }; | + | 10.0.2.0/ |
- | recursion | + | }; |
+ | |||
+ | /* | ||
+ | - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion. | ||
+ | - If you are building a RECURSIVE (caching) DNS server, you need to enable | ||
+ | | ||
+ | - If your recursive DNS server has a public IP address, you MUST enable access | ||
+ | | ||
+ | cause your server to become part of large scale DNS amplification | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | recursion yes; | ||
+ | |||
+ | dnssec-enable yes; | ||
+ | | ||
+ | |||
+ | /* Path to ISC DLV key */ | ||
+ | bindkeys-file "/ | ||
- | dnssec-enable yes; | + | managed-keys-directory "/ |
- | dnssec-validation yes; | + | |
- | dnssec-lookaside auto; | + | |
- | /* Path to ISC DLV key */ | + | pid-file "/run/named/ |
- | bindkeys-file "/etc/named.iscdlv.key"; | + | |
}; | }; | ||
Ligne 913: | Ligne 1004: | ||
zone " | zone " | ||
- | type hint; | + | |
- | file " | + | file " |
}; | }; | ||
key " | key " | ||
- | algorithm hmac-md5; | + | |
- | secret "NuPP8qFNPZ7m0rWPPahRtA=="; | + | secret "F5/ |
}; | }; | ||
include "/ | include "/ | ||
- | </file> | + | include "/ |
+ | </code> | ||
- | Afin de dire à named d' | + | Afin de dire à named d' |
- | <file text named.conf> | + | <code> |
+ | [root@centos7 ~]# vi / | ||
+ | [root@centos7 ~]# cat /etc/named.conf | ||
// | // | ||
// named.conf | // named.conf | ||
Ligne 936: | Ligne 1030: | ||
// See / | // See / | ||
// | // | ||
+ | // See the BIND Administrator' | ||
+ | // configuration located in / | ||
options { | options { | ||
- | listen-on port 53 { 127.0.0.1; }; | + | |
- | listen-on-v6 port 53 { ::1; }; | + | listen-on-v6 port 53 { ::1; }; |
- | directory | + | directory |
- | dump-file | + | dump-file |
statistics-file "/ | statistics-file "/ | ||
memstatistics-file "/ | memstatistics-file "/ | ||
- | allow-query { | + | recursing-file |
- | localhost; | + | secroots-file |
- | 10.0.2.0/ | + | |
- | }; | + | localhost; |
- | forwarders { 10.0.2.3; }; | + | 10.0.2.0/ |
- | recursion | + | }; |
+ | |||
+ | /* | ||
+ | - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion. | ||
+ | - If you are building a RECURSIVE (caching) DNS server, you need to enable | ||
+ | | ||
+ | - If your recursive DNS server has a public IP address, you MUST enable access | ||
+ | | ||
+ | cause your server to become part of large scale DNS amplification | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | recursion yes; | ||
+ | |||
+ | dnssec-enable yes; | ||
+ | | ||
+ | |||
+ | /* Path to ISC DLV key */ | ||
+ | bindkeys-file "/ | ||
- | dnssec-enable yes; | + | managed-keys-directory "/ |
- | dnssec-validation yes; | + | |
- | dnssec-lookaside auto; | + | |
- | /* Path to ISC DLV key */ | + | pid-file "/run/named/ |
- | bindkeys-file "/etc/named.iscdlv.key"; | + | |
}; | }; | ||
Ligne 967: | Ligne 1079: | ||
zone " | zone " | ||
- | type hint; | + | |
- | file " | + | file " |
}; | }; | ||
Ligne 976: | Ligne 1088: | ||
key " | key " | ||
- | algorithm hmac-md5; | + | |
- | secret "NuPP8qFNPZ7m0rWPPahRtA=="; | + | secret "F5/ |
}; | }; | ||
include "/ | include "/ | ||
- | </file> | + | include "/ |
+ | </code> | ||
- | A ce stade, rndc ne peut pas se connecter à named : | + | A ce stade, rndc ne peut pas se connecter à named. La raison est le manque du fichier **/ |
< | < | ||
- | [root@centos6 | + | [root@centos7 |
- | rndc: connection to remote host closed | + | cat: /etc/rndc.conf: No such file or directory |
- | This may indicate that | + | |
- | * the remote server is using an older version of the command protocol, | + | |
- | * this host is not authorized to connect, | + | |
- | * the clocks are not synchronized, | + | |
- | * the key is invalid. | + | |
- | named (pid 10806) en cours d' | + | |
</ | </ | ||
- | La raison est le manque du fichier | + | Créez donc ce fichier : |
- | <file text rndc.conf> | + | <code> |
+ | [root@centos7 ~]# vi / | ||
+ | [root@centos7 ~]# cat /etc/rndc.conf | ||
key " | key " | ||
- | algorithm hmac-md5; | + | |
- | secret "NuPP8qFNPZ7m0rWPPahRtA=="; | + | secret "F5/ |
}; | }; | ||
Ligne 1008: | Ligne 1117: | ||
default-key | default-key | ||
}; | }; | ||
- | </file> | + | </code> |
<WRAP center round important 60%> | <WRAP center round important 60%> | ||
- | **Important** - Notez la présence de la section concernant la valeur de la clef et la section qui définit le serveur par défaut et la clef par défaut.Dans le cas où vous avez plusieurs serveurs à gérer à partir d'une seule instance de rndc vous pouvez inclure des clauses supplémentaires correspondantes à chaque configuration des fichiers / | + | **Important** - Notez la présence de la section concernant la valeur de la clef et la section qui définit le serveur par défaut et la clef par défaut. Dans le cas où vous avez plusieurs serveurs à gérer à partir d'une seule instance de rndc vous pouvez inclure des clauses supplémentaires correspondantes à chaque configuration des fichiers / |
</ | </ | ||
- | Pour prendre en compte cette configuration, | + | Pour prendre en compte cette configuration, |
< | < | ||
- | [root@centos6 | + | [root@centos7 |
- | Arrêt de named : . [ OK ] | + | |
- | Démarrage de named : | + | [root@centos7 ~]# systemctl status named |
+ | ● named.service - Berkeley Internet Name Domain (DNS) | ||
+ | | ||
+ | | ||
+ | Process: 9129 ExecStop=/ | ||
+ | Process: 9142 ExecStart=/ | ||
+ | Process: 9140 ExecStartPre=/ | ||
+ | Main PID: 9144 (named) | ||
+ | | ||
+ | | ||
+ | |||
+ | Nov 02 05:47:10 centos7.fenestros.loc named[9144]: network unreachable resolving ' | ||
+ | Nov 02 05:47:10 centos7.fenestros.loc named[9144]: | ||
+ | Nov 02 05:47:10 centos7.fenestros.loc named[9144]: | ||
+ | Nov 02 05:47:10 centos7.fenestros.loc named[9144]: | ||
+ | Nov 02 05:47:10 centos7.fenestros.loc named[9144]: | ||
+ | Nov 02 05:47:10 centos7.fenestros.loc named[9144]: | ||
+ | Nov 02 05:47:10 centos7.fenestros.loc named[9144]: | ||
+ | Nov 02 05:47:10 centos7.fenestros.loc named[9144]: | ||
+ | Nov 02 05:47:10 centos7.fenestros.loc named[9144]: | ||
+ | Nov 02 05:47:10 centos7.fenestros.loc named[9144]: | ||
</ | </ | ||
Ligne 1025: | Ligne 1154: | ||
< | < | ||
- | [root@centos6 | + | [root@centos7 |
- | version: 9.7.3-P3-RedHat-9.7.3-8.P3.el6_2.2 | + | WARNING: key file (/ |
+ | version: | ||
+ | running on centos7.fenestros.loc: | ||
+ | boot time: Wed, 02 Nov 2022 04:47:10 GMT | ||
+ | last configured: Wed, 02 Nov 2022 04:47:10 GMT | ||
+ | configuration file: /etc/named.conf | ||
CPUs found: 1 | CPUs found: 1 | ||
worker threads: 1 | worker threads: 1 | ||
- | number of zones: | + | UDP listeners per interface: 1 |
+ | number of zones: | ||
debug level: 0 | debug level: 0 | ||
xfers running: 0 | xfers running: 0 | ||
Ligne 1035: | Ligne 1170: | ||
soa queries in progress: 0 | soa queries in progress: 0 | ||
query logging is OFF | query logging is OFF | ||
- | recursive clients: 0/0/1000 | + | recursive clients: 0/900/1000 |
- | tcp clients: | + | tcp clients: |
server is up and running | server is up and running | ||
- | named (pid 12105) en cours d' | ||
</ | </ | ||
- | |||
- | <WRAP center round important 60%> | ||
- | **Important** - Notez les lignes supplémentaires dans la sortie. | ||
- | </ | ||
Les options de cette commande sont : | Les options de cette commande sont : | ||
< | < | ||
- | [root@centos6 | + | [root@centos7 |
rndc: invalid argument -- | rndc: invalid argument -- | ||
Usage: rndc [-b address] [-c config] [-s server] [-p port] | Usage: rndc [-b address] [-c config] [-s server] [-p port] | ||
- | [-k key-file ] [-y key] [-V] command | + | |
command is one of the following: | command is one of the following: | ||
- | | + | |
- | reload | + | |
- | Reload a single | + | |
- | | + | |
- | Schedule immediate maintenance for a zone. | + | |
- | | + | Close, truncate and re-open the DNSTAP output file. |
- | Retransfer | + | dnstap -roll count |
- | freeze Suspend updates to all dynamic zones. | + | Close, rename and re-open the DNSTAP output file(s). |
+ | dumpdb | ||
+ | Dump cache(s) to the dump file (named_dump.db). | ||
+ | flush | ||
+ | flush [view] | ||
+ | flushname name [view] | ||
+ | Flush the given name from the server' | ||
+ | flushtree name [view] | ||
+ | Flush all names under the given name from the server' | ||
+ | freeze | ||
freeze zone [class [view]] | freeze zone [class [view]] | ||
- | Suspend updates to a dynamic zone. | + | |
- | | + | |
- | | + | |
- | Enable | + | |
- | | + | |
- | Resend NOTIFY messages for the zone. | + | |
- | reconfig Reload configuration file and new zones only. | + | |
- | sign zone [class [view]] | + | |
- | Update zone keys, and sign as needed. | + | |
loadkeys zone [class [view]] | loadkeys zone [class [view]] | ||
- | Update keys without signing immediately. | + | |
- | | + | |
- | | + | Check trust anchor for RFC 5011 key changes |
- | | + | managed-keys status [class [view]] |
- | Dump cache(s) to the dump file (named_dump.db). | + | Display RFC 5011 managed keys information |
+ | managed-keys sync [class [view]] | ||
+ | | ||
+ | modzone zone [class [view]] { zone-options } | ||
+ | Modify a zone's configuration. | ||
+ | Requires allow-new-zones option. | ||
+ | notify zone [class [view]] | ||
+ | Resend NOTIFY messages for the zone. | ||
+ | | ||
+ | | ||
+ | List all negative trust anchors. | ||
+ | nta [-lifetime duration] [-force] domain | ||
+ | Set a negative trust anchor, disabling DNSSEC validation | ||
+ | for the given domain. | ||
+ | Using -lifetime specifies the duration of the NTA, up | ||
+ | to one week. | ||
+ | Using -force prevents the NTA from expiring before its | ||
+ | full lifetime, even if the domain can validate sooner. | ||
+ | nta -remove domain [view] | ||
+ | | ||
+ | for the given domain. | ||
+ | querylog [ on | off ] | ||
+ | Enable / disable query logging. | ||
+ | reconfig | ||
+ | recursing | ||
+ | refresh zone [class [view]] | ||
+ | Schedule immediate maintenance for a zone. | ||
+ | reload | ||
+ | reload zone [class [view]] | ||
+ | Reload a single zone. | ||
+ | retransfer zone [class [view]] | ||
+ | Retransfer a single zone without checking serial number. | ||
+ | scan Scan available network interfaces for changes. | ||
secroots [view ...] | secroots [view ...] | ||
- | Write security roots to the secroots file. | + | |
- | stop Save pending updates to master files and stop the server. | + | showzone zone [class [view]] |
- | stop -p Save pending updates to master files and stop the server | + | Print a zone's configuration. |
- | reporting process id. | + | sign zone [class [view]] |
- | | + | Update zone keys, and sign as needed. |
- | | + | signing -clear all zone [class [view]] |
- | process id. | + | Remove the private records for all keys that have |
- | trace Increment debugging level by one. | + | finished signing the given zone. |
- | trace level Change the debugging level. | + | signing -clear < |
- | | + | Remove the private record that indicating the given key |
- | flush Flushes all of the server' | + | has finished signing the given zone. |
- | flush [view] Flushes the server' | + | signing -list zone [class [view]] |
- | | + | List the private records showing the state of DNSSEC |
- | Flush the given name from the server' | + | signing in the given zone. |
- | status Display status of the server. | + | signing -nsec3param hash flags iterations salt zone [class [view]] |
- | recursing Dump the queries that are currently recursing (named.recursing) | + | Add NSEC3 chain to zone if already signed. |
- | validation | + | Prime zone with NSEC3 chain if not yet signed. |
- | Enable / disable DNSSEC validation. | + | signing -nsec3param none zone [class [view]] |
- | | + | Remove NSEC3 chains from zone. |
- | addzone [" | + | signing -serial < |
- | Add zone to given view. Requires new-zone-file option. | + | Set the zones' |
- | delzone [" | + | stats Write server statistics to the statistics file. |
- | Removes zone from given view. Requires new-zone-file option. | + | status |
+ | stop Save pending updates to master files and stop the server. | ||
+ | stop -p | ||
+ | reporting process id. | ||
+ | | ||
+ | remove their journal files. | ||
+ | | ||
+ | Dump a single zone's changes to disk, and optionally | ||
+ | remove its journal file. | ||
+ | thaw Enable | ||
+ | thaw zone [class [view]] | ||
+ | Enable updates to a frozen dynamic zone and reload it. | ||
+ | trace | ||
+ | trace level | ||
+ | | ||
+ | Delete | ||
+ | | ||
+ | | ||
+ | validation | ||
+ | Enable / disable DNSSEC validation. | ||
+ | | ||
+ | | ||
- | * == not yet implemented | + | Version: 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.10 |
- | Version: 9.7.3-P3-RedHat-9.7.3-8.P3.el6_2.2 | + | |
</ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **Important** - Notez la sous-commande **reload** qui permet de recharger la configuration d'une zone spécifique sans recharger la configuration de toutes les zones. | ||
+ | </ | ||
+ | |||
+ | =====Caractéristiques avancées de Bind===== | ||
+ | |||
+ | ====DNSSEC==== | ||
+ | |||
+ | **DNSSEC** — Abréviation de DNS SECurity, cette fonctionnalité permet aux zones d' | ||
+ | |||
+ | * De cette manière, les informations sur une zone spécifique peuvent être vérifiées comme provenant d'un serveur de noms qui l'a signée avec une clé privée particulière, | ||
+ | |||
+ | BIND version 9 prend également en charge la méthode d' | ||
+ | |||
+ | ====TSIG==== | ||
+ | |||
+ | **TSIG** — Abréviation de Transaction SIGNatures, cette fonctionnalité permet un transfert du maître vers l' | ||
+ | |||
+ | * Cette fonctionnalité renforce la méthode standard d' | ||
+ | |||
+ | BIND version 9 prend également en charge TKEY, qui est une autre méthode de clé secrète partagée pour autoriser les transferts de zone. | ||
+ | |||
+ | ---- | ||
+ | Copyright © 2022 Hugh Norris | ||