ANNEXE 23 - Exemple de configuration Bind9 ========================================== /etc/bind/named.conf : ---------------------- /////////////////////////////////////////////////////////////////////////////// /////////////////////////////// Main Options ////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// options { directory "/var/cache/bind"; // Si vous desirez transmettre les requetes pour lesquelles vous n'etes // pas autorite au lieu de les resoudre vous meme : // forwarders { a.b.c.d; e.f.g.h; }; // Eviter tout transfert de zone du type: dig @nameserver domain axfr allow-transfer { localhost; }; // Accepter les requetes de notre reseau local uniquement. // Cette directive est redefinie pour nos propres zones. allow-query { 10.1.1.0/24; localhost; }; // Autoriser la recursion pour notre reseau local uniquement. allow-recursion { 10.1.1.0/24; }; auth-nxdomain no; # conform to RFC1035 }; /////////////////////////////////////////////////////////////////////////////// ///////////////////// Security : Rndc and Version ///////////////////////////// /////////////////////////////////////////////////////////////////////////////// controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; }; }; // Eviter l'envoi de la version Bind : dig @nameserver version.bind chaos txt view chaosnet chaos { zone "bind" { type master; allow-query { localhost; }; file "/etc/bind/bindchaos"; }; }; /////////////////////////////////////////////////////////////////////////////// ////////////////////////// ZONE DEFINITIONS /////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// view internet in { zone "." { type hint; file "/etc/bind/db.root"; }; zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; /////////////////////////////////////////////////////////////////////////////// /////////////////////////////// DOMAIN ZONES ////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// zone "1.1.10.in-addr.arpa" { type master; allow-query { any; }; file "/etc/bind/1.1.10.in-addr.arpa"; }; zone "mondomaine" { type master; allow-query { any; }; file "/etc/bind/mondomaine"; }; }; /etc/bind/bindchaos: -------------------- $TTL 86400 $ORIGIN bind. @ CH SOA localhost. root.localhost. ( 1 3H 1H 1W 1D ) CH NS localhost. version.bind. CH TXT "Bind 9.2.1" /etc/bind/1.1.10.in-addr.arpa: ------------------------------ $TTL 86400 @ IN SOA mondomaine. postmaster.mail ( 2004080600 ; Serial YYMMDD## 86400 ; Refresh once a day 21600 ; Try each 6 hours 1209600 ; Expire after 2 weeks 86400 ) ; Minimal one day @ IN NS mondomaine. 42 IN PTR mondomaine. /etc/bind/mondomaine: --------------------- $TTL 86400 @ IN SOA mondomaine. postmaster.mail ( 2004080600 ; Serial YYMMDD## 86400 ; Refresh once a day 21600 ; Try each 6 hours 1209600 ; Expire after 2 weeks 86400 ) ; Minimal one day @ IN NS mondomaine. @ IN MX 10 mail mondomaine. IN A 10.1.1.42 mail IN A 10.1.1.42 www IN CNAME mondomaine. pop IN CNAME mail smtp IN CNAME mail