Bonjour,
(fichier de configuration après le texte.)
Pour un TP nous devons créer une sous-zone et donc un server pour la zone principale et un autre qui aura la charge de la sous-zone.
Le but est de faire qu'une demande d'une machine sur le sous-domaine qui est envoyé au server "maître" soit redirigé vers le controleur de sous-domaine.
Nous avons réussis en ajoutant dans le fichier d'options le "forwarders" avec l'IP du server sous-domaine. Mais cela n'est pas ce que l'on recherche puisque le sous-domaine deveint un domaine.
Les fichiers de configuration sont "valides syntaxiquement" puisque les commandes named-checkconf et named-checkzone sur chaque zone ne retourne pas d'erreur.
En utilisant ethereal on voit bien que sans le "forwarders" le server "maître" n'interroge pas le DNS du sous-domaine.
db.anne sur le DNS "maître"
Code :
$TTL 604800
@ IN SOA anne.asrall. contact.truc.fr. (
2
604800
86400
2419200
604800 )
;
anne.asrall. IN NS ns.anne.asrall.
ns A 192.168.10.15
@ IN MX 10 mail.anne.asrall.
mail IN A 192.168.10.15
;@ IN NS mondns.monserv.fr.
;mondns.monserv.fr. IN A 192.168.10.68
monserv.anne.asrall. IN NS mondns.monserv.anne.asrall.
mondns.monserv.anne.asrall. IN A 192.168.10.68
named.conf sur le domaine "maître"
Code :
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
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";
};
// zone "com" { type delegation-only; };
// zone "net" { type delegation-only; };
// From the release notes:
// Because many of our users are uncomfortable receiving undelegated answers
// from root or top level domains, other than a few for whom that behaviour
// has been trusted and expected for quite some length of time, we have now
// introduced the "root-delegations-only" feature which applies delegation-only
// logic to all top level domains, and to the root domain. An exception list
// should be specified, including "MUSEUM" and "DE", and any other top level
// domains from whom undelegated responses are expected and trusted.
// root-delegation-only exclude { "DE"; "MUSEUM"; };
include "/etc/bind/named.conf.local";
//tp 3
zone "anne.asrall" {
type master;
file "/etc/bind/db.anne";
};
zone "10.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.reseau";
};
//serveur secondaire
//zone "monserv.fr" {
// type slave;
// file "/etc/bind/db.nadia";
// masters { 192.168.10.68; };
// };
fichier zone sous-domaine suir le DNS du sous-domaine
Code :
$TTL 86400
@ IN SOA monserv.anne.asrall contact.autre.zone.fr. (
1 ;serial
21600 ;refresh
3600 ;retry
604800 ;expiry
86400 ) ;TTL minimal
;
@ IN NS mondns.monserv.anne.asrall.
@ IN NS ns.anne.asrall.
@ IN MX 10 mail.monserv.anne.asrall.
mondns IN A 192.168.10.68
mail IN A 192.168.10.68
named.conf sur DNS sous-domaine
Code :
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers
//zone "." {
// type hint;
// file "/etc/bind/db.root";
//};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
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";
};
// ma zone a moi
//zone "monserv.fr" {
// type master;
// file "/etc/bind/zones/monserv.fr.zone";
//};
//zone "10.168.192.in-addr.arpa" {
// type master;
// file "/etc/bind/zones/monserv.fr.in-addr.arpa.zone";
//};
//celle du PC voisin
//zone "anne.asrall" {
// type slave;
// file "/etc/bind/zones/anne.asrall.zone";
// masters { 192.168.10.15; };
//};
//sous domaine
zone "monserv.anne.asrall" {
type master;
file "/etc/bind/zones/monserv.anne.asrall.zone";
};
zone "10.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/monserv.anne.asrall.inverse.zone";
};
// zone "com" { type delegation-only; };
// zone "net" { type delegation-only; };
// From the release notes:
// Because many of our users are uncomfortable receiving undelegated answers
// from root or top level domains, other than a few for whom that behaviour
// has been trusted and expected for quite some length of time, we have now
// introduced the "root-delegations-only" feature which applies delegation-only
// logic to all top level domains, and to the root domain. An exception list
// should be specified, including "MUSEUM" and "DE", and any other top level
// domains from whom undelegated responses are expected and trusted.
// root-delegation-only exclude { "DE"; "MUSEUM"; };
include "/etc/bind/named.conf.local";