serveur_bind
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 | ||
serveur_bind [2009/01/25 16:32] – thierry | serveur_bind [2012/04/11 18:44] (Version actuelle) – thierry | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== BIND ====== | ====== BIND ====== | ||
Ou DNS ou " | Ou DNS ou " | ||
+ | |||
+ | Lien: http:// | ||
+ | |||
===== installer ===== | ===== installer ===== | ||
==== package ==== | ==== package ==== | ||
Ligne 48: | Ligne 51: | ||
| | ||
// </tj> | // </tj> | ||
+ | |||
+ | |||
+ | |||
Ligne 119: | Ligne 125: | ||
}; | }; | ||
- | | :!: Il y aurait | + | | :!: La securité tient simplement aux adresses IP ! c'est mince. \\ Voir la section suivant pour l' |
+ | |||
+ | === Notify === | ||
+ | |||
+ | Lien: http:// | ||
+ | |||
+ | En l' | ||
+ | |||
+ | Si on veut une " | ||
+ | SOA .... | ||
+ | ... | ||
+ | NS ns.thierry-jaouen.fr | ||
+ | NS ns-slave1.xxxxxxx.xxx | ||
+ | NS ns-slave2.xxxxxxx.xxx | ||
+ | " | ||
+ | |||
+ | Lorsqu' | ||
+ | type slave; | ||
+ | ... | ||
+ | also-notify { ip-d-un-autre-slave; | ||
+ | ... | ||
+ | |||
+ | |||
+ | ==== Delegate Zone ==== | ||
+ | |||
+ | Le but: déléguer un sous domaine a un autre DNS, ainsi que le reverse. | ||
+ | |||
+ | Exemple de sous-domaine: | ||
+ | univers.thierry-jaouen.local | ||
+ | |||
+ | Afin que ca fonctionne bien, surtout pour le reverse , on doit attribuer une tranche d'un reseau, comme: | ||
+ | 192.168.16.192/ | ||
+ | ... ce qui délègue l' | ||
+ | |||
+ | === zone === | ||
+ | Lien: http:// | ||
+ | |||
+ | === reverse === | ||
+ | Lien: http:// | ||
+ | |||
+ | ==== TSIG ==== | ||
+ | |||
+ | === authentifier un slave === | ||
+ | Lien: [[http:// | ||
+ | |||
+ | == generer key == | ||
+ | |||
+ | Dans un répertoire du maitre (ou de l' | ||
+ | # dnssec-keygen -a HMAC-MD5 -b 128 -n HOST rndc-key | ||
+ | Ca va créer 2 fichiers avec de droles de noms (par exemple): | ||
+ | |||
+ | -rw------- 1 root bind 81 2009-01-27 23:14 Krndc-key.+157+26049.private | ||
+ | -rw------- 1 root bind 52 2009-01-27 23:14 Krndc-key.+157+26049.key | ||
+ | Mais peu importe: on veut juste extraire la clé qui est dedans, et puis effacer ces fichiers ! Exemple: | ||
+ | ... < | ||
+ | Key: 0jnu3SdsMvzzlmTDPYRceA== | ||
+ | ... < | ||
+ | |||
+ | == fichier key == | ||
+ | |||
+ | Sur le maitre et sur le slave, on peut faire comme cela: | ||
+ | # cd /etc/bind | ||
+ | # mkdir keys | ||
+ | # chown root:bind keys | ||
+ | # chmod o-rx keys | ||
+ | # cd keys | ||
+ | Creer un fichier , par exemple **'' | ||
+ | key " | ||
+ | algorithm hmac-md5; | ||
+ | secret " | ||
+ | }; | ||
+ | |||
+ | == named.conf.local == | ||
+ | Inserer enfin la configuration suivante dans '' | ||
+ | include "/ | ||
+ | |||
+ | et puis pour le maitre: | ||
+ | server < | ||
+ | keys { | ||
+ | bindtest-netcave; | ||
+ | }; | ||
+ | }; | ||
+ | sinon pour l' | ||
+ | server < | ||
+ | keys { | ||
+ | bindtest-netcave; | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | Le reste ne change | ||
+ | Pour le maitre par exemple: | ||
+ | zone " | ||
+ | type master; | ||
+ | file "/ | ||
+ | allow-query { | ||
+ | 10.22.0/ | ||
+ | }; | ||
+ | allow-transfer { | ||
+ | < | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | Si j'ai bien compris, la declaration " | ||
+ | |||
+ | ===== Tips ===== | ||
+ | ==== Vider le cache pour tout ==== | ||
+ | |||
+ | Sans redemarrer: | ||
+ | |||
+ | # rndc flush | ||
+ | |||
+ | ==== Vider cache pour 1 domaine ==== | ||
+ | Lien: http:// | ||
+ | |||
+ | A tester: | ||
+ | # rndc flushname www.free.fr | ||
+ | |||
+ | |||
+ | ==== dump cache ==== | ||
+ | |||
+ | Lien: http:// | ||
+ | |||
+ | Voir un etat du cache bind: | ||
+ | # rndc dumpdb -cache | ||
+ | |||
+ | Et regarder dans le fichier là: | ||
+ | / | ||
+ | |||
+ | ==== reload etc... ==== | ||
+ | Il y a 2 manières de recharger la config: | ||
+ | # / | ||
+ | Reloading domain name service...: bind. | ||
+ | Ou bien: | ||
+ | # rndc reload | ||
+ | server reload successful | ||
+ | |||
+ | ==== CIDR ==== | ||
+ | |||
+ | Liens: | ||
+ | *http:// | ||
+ | |||
+ | ===== Performance ===== | ||
+ | |||
+ | Tester les perfs: http:// | ||
+ | |||
+ | Limiter les DoS: http:// | ||
serveur_bind.1232901172.txt.gz · Dernière modification : 2009/01/25 16:32 de thierry