Bonjour à tous, j’ai un serveur sur debian 6 avec entre autres bind9.
Il fonctionnait parfaitement depuis plusieurs années jusqu’à ce qu’il soit rallumé ce matin après 15j d’extinction.
Le serveur a pour nom : fwbinero et pour ip 10.0.0.1
Il est également serveur DHCP.
Il est également passerelle vers l’internet pour le réseau local (via l’interface eth1 : 192.168.1.2)
Ma box est en 192.168.1.1
Le service de bind fonctionne parfaitement pour les autres serveurs qui parviennent à résoudre les noms. Cependant, le serveur sur lequel tourne le service bind (donc fwbinero) ne résoud pas les noms locaux, uniquement les noms sur le wan.
Voici des exemples :
Nom local… ça ne fonctionne pas
root@fwbinero:~# host bdbinero
Host bdbinero not found: 2(SERVFAIL)
Sinon ça fonctionne…
root@fwbinero:~# host debian-fr.org
debian-fr.org has address 104.28.13.4
debian-fr.org has address 104.28.12.4
Host debian-fr.org.home not found: 4(NOTIMP)
debian-fr.org mail is handled by 10 omoikane.ptitoliv.net.
debian-fr.org mail is handled by 20 kaoru.asyd.net.
root@fwbinero:~# dig
; <<>> DiG 9.7.3 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11125
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;. IN NS
;; ANSWER SECTION:
. 433292 IN NS h.root-servers.net.
. 433292 IN NS k.root-servers.net.
. 433292 IN NS f.root-servers.net.
. 433292 IN NS b.root-servers.net.
. 433292 IN NS j.root-servers.net.
. 433292 IN NS a.root-servers.net.
. 433292 IN NS g.root-servers.net.
. 433292 IN NS m.root-servers.net.
. 433292 IN NS l.root-servers.net.
. 433292 IN NS e.root-servers.net.
. 433292 IN NS i.root-servers.net.
. 433292 IN NS d.root-servers.net.
. 433292 IN NS c.root-servers.net.
;; Query time: 43 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Mon Aug 24 15:56:25 2015
;; MSG SIZE rcvd: 228
root@fwbinero:~# nslookup bdbinero
Server: 192.168.1.1
Address: 192.168.1.1#53
** server can't find bdbinero: SERVFAIL
root@fwbinero:~# named-checkconf -z
zone localhost/IN: loaded serial 2
zone 127.in-addr.arpa/IN: loaded serial 1
zone 255.in-addr.arpa/IN: loaded serial 1
zone binero.corp/IN: loaded serial 970
zone binero.fr/IN: loaded serial 86
zone 0.0.10.in-addr.arpa/IN: loaded serial 648
Voici mes fichiers de conf :
cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
#iface eth0 inet dhcp
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address "10.0.0.1"
netmask "255.255.255.0"
network "10.0.0.0"
broadcast "10.0.0.255"
allow-hotplug eth0:0
iface eth0:0 inet static
address "10.0.1.1"
netmask "255.255.255.0"
network "10.0.1.0"
brodcast "10.0.1.255"
allow-hotplug eth1
iface eth1 inet static
address "192.168.1.2"
netmask "255.255.255.0"
gateway "192.168.1.1"
network "192.168.1.0"
broadcast "192.168.1.255"
cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 fwbinero.binero.corp fwbinero
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
cat /etc/host.conf
multi on
cat /etc/bind/named.conf
// 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";
};
include "/etc/bind/rndc.key";
include "/etc/bind/named.conf.local";
cat /etc/bind/named.conf.options
options {
//directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
192.168.1.1;
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
cat /etc/bind/db.10
$ORIGIN .
$TTL 604800 ; 1 week
binero.corp IN SOA fwbinero.binero.corp. root.fwbinero.binero.corp. (
970 ; serial
604800 ; refresh (1 week)
86400 ; retry (1 day)
2419200 ; expire (4 weeks)
604800 ; minimum (1 week)
)
NS fwbinero.binero.corp.
A 127.0.0.1
AAAA ::1
$ORIGIN binero.corp.
bdbinero A 10.0.0.2
fwbinero A 10.0.0.1
sfbinero A 10.0.0.3
cat /etc/bind/db.local
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA localhost. root.localhost. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS localhost.
@ IN A 127.0.0.1
@ IN AAAA ::1
Je n’ai aucune erreur dans le syslog et le service démarre parfaitement bien.
MERCI DE VOTRE AIDE !!
