Jonat
Août 28, 2007, 10:02
1
Salut les linuxiens
Je suis en formation et je rencontre un problème avec mon DNS dynamique et mon DNS secondaire (si c’est vraiment un problème )
ns1 OK, synchro ns2 OK (j’ai ajouté allow-query {172.16.140.39;}; dans le named.conf.options car il refusait de notifier à lui-même (refused notify from non master dans les logs. Après cet ajout je n’avais plus ces refused)
Ensuite, j’ai installé un serveur DHCP sur la machine ns2 et je l’ai configuré pour avoir un DNS dynamique avec le ns1 (en utilisant une key)
Le DNS dynamique fonctionne mais depuis les refused notify from non master sont de retour dans les logs du ns2 :@
Une idée ?
Merci d’avance
Fichiers de conf’ :
named.conf ns1.trois.tssi :
// 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/mykey.key”;
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 “trois.tssi” {
type master;
notify yes;
allow-transfer {172.16.140.39;};
allow-update {key mykey;};
file “/etc/bind/db.trois.tssi”;
};
zone “140.16.172.in-addr.arpa” {
type master;
notify yes;
allow-transfer {172.16.140.39;};
allow-update {key mykey;};
file “/etc/bind/db.140.16.172.in-addr.arpa”;
};
// 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”;
named ns2.trois.tssi :
// 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 “trois.tssi” {
type slave;
masters {172.16.140.38;};
file “/etc/bind/db.trois.tssi”;
};
zone “140.16.172.in-addr.arpa” {
type slave;
masters {172.16.140.38;};
file “/etc/bind/db.140.16.172.in-addr.arpa”;
};
// 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”;
dhcpd.conf :
Sample configuration file for ISC dhcpd for Debian
$Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
include “/etc/dhcp3/mykey.key”;
The ddns-updates-style parameter controls whether or not the server will
attempt to do a DNS update when a lease is confirmed. We default to the
behavior of the version 2 packages (‘none’, since DHCP v2 didn’t
have support for DDNS.)
ddns-update-style interim;
ddns-updates on;
ddns-rev-domainname “140.16.172.in-addr.arpa”;
option definitions common to all supported networks…
option domain-name “trois.tssi”;
option domain-name-servers 172.16.140.38;
zone trois.tssi {
primary 172.16.140.38;
key “mykey”;
}
zone 140.16.172.in-addr.arpa {
primary 172.16.140.38;
key “mykey”;
}
default-lease-time 600;
max-lease-time 7200;
If this DHCP server is the official DHCP server for the local
network, the authoritative directive should be uncommented.
#authoritative ;
Use this to send dhcp log messages to a different log file (you also# have to hack syslog.conf to complete the redirection).
log-facility local7;
No service will be given on this subnet, but declaring it helps the
DHCP server to understand the network topology.
#subnet 10.152.187.0 netmask 255.255.255.0 {
#}
This is a very basic subnet declaration.
subnet 172.16.140.0 netmask 255.255.255.0 {
range 172.16.140.130 172.16.140.139;
option routers 172.16.140.1;
}
This declaration allows BOOTP clients to get dynamic addresses,
which we don’t really recommend.
#subnet 172.16.140.0 netmask 255.255.255.0 {
range dynamic-bootp 172.16.140.130 172.16.140.139;
option broadcast-address 172.16.140.255;
option routers 172.16.140.1;
#}
A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
range 10.5.5.26 10.5.5.30;
option routers 10.5.5.1;
option broadcast-address 10.5.5.31;
default-lease-time 600;
max-lease-time 7200;
#}
Hosts which require special configuration options can be listed in
host statements. If no address is specified, the address will be
allocated dynamically (if possible), but the host-specific information
will still come from the host declaration.
#host passacaglia {
hardware ethernet 0:0:c0:5d:bd:95;
filename “vmunix.passacaglia”;
#}
Fixed IP addresses can also be specified for hosts. These addresses
should not also be listed as being available for dynamic assignment.
Hosts for which fixed IP addresses have been specified can boot using
BOOTP or DHCP. Hosts for which no fixed address is specified can only
be booted with DHCP, unless there is an address range on the subnet
to which a BOOTP client is connected which has the dynamic-bootp flag
set.
#host fantasia {
hardware ethernet 08:00:07:26:c0:a5;
#}
You can declare a class of clients and then do address allocation
based on that. The example below shows a case where all clients
in a certain class get addresses on the 10.17.224/24 subnet, and all
other clients get addresses on the 10.0.29/24 subnet.
#class “foo” {
match if substring (option vendor-class-identifier, 0, 4) = “SUNW”;
#}
#shared-network 224-29 {
subnet 10.17.224.0 netmask 255.255.255.0 {
}
subnet 10.0.29.0 netmask 255.255.255.0 {
}
pool {
allow members of “foo”;
range 10.17.224.10 10.17.224.250;
}
pool {
deny members of “foo”;
range 10.0.29.10 10.0.29.230;
}
#}
Extrait de mes logs du ns2 :
ouch, ma bete noire…
desole, je vois pas d’erreur… essai de poster ca chez les gens de bind
sources: Mon bouquin sur Bind
Je pense donc que c’est en trop
de plus:
On peut aussi utiliser allow-notify pour indiquer au serveur d’accépter les annonces provenant d’autres serveurs que le serveur-maître de la zone.
Utilisée dans la structure options, allow-notify concerne toutes les zones. Utilisée dans une structure zone, allow-notify réinitialise toutes les définitions globales allow-notify pour cette zone
sources : idem
donc ta directive [quote=""]
notify yes;
[/quote]
est au mieux inutile, au pire c’est elle qui crée le message d’erreur dans ton log
Edité le 28/08/2007 à 19:55
tiens j’ai trouvé ça (après une longue recherche de 15secondes sur google www.google.fr… !) ) ça répond à ton message d’erreur
forum.hardware.fr…
Bonjour,
Dans la série truc & astuce pour bind : Suite à une mise à jour vers bind9.3, je suis tombé sur le message d’erreur suivant pour TOUS les domaines hébergés sur mon serveur DNS :
Apr 16 00:34:38 ns2 named[4586]: client 212.85.137.31#1293: received notify for zone ‘blabla.eu.org ’
Apr 16 00:34:38 ns2 named[4586]: zone blabla.eu.org/IN: refused notify from non-master: 212.85.137.31#1293
Le problème se résoud tout simplement en ajoutant une autorisation explicite dans les options de bind :
donc dans la zone de named.conf (ici sur une debian c’était dans /etc/bind/named.conf.options : )
options {
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
allow-query { any; }; // This is the default
recursion no; // Do not provide recursive service
// On autorise bind à se notifier lui-même
allow-notify { 212.85.137.31; };
}
Une fois cela fait, on obtient une config qui se synchronise bien :
Apr 16 00:43:13 ns2 named[4973]: zone blabla.eu.org/IN: sending notifies (serial 2004110621)
Apr 16 00:43:13 ns2 named[4973]: client 212.85.137.31#1295: received notify for zone ‘blabla.eu.org ’
Apr 16 00:43:13 ns2 named[4973]: zone blabla.eu.org/IN: notify from 212.85.137.31#1295: zone is up to date
Edité le 28/08/2007 à 20:57