Bonjour,
Après lecture de moultes tutos sur Bind sous debian, je n'arrive toujours pas à mettre en place un DNS en local. C'est pourquoi, je m'en remet à vous.
Les vms sont créées avec virtualbox.
Serveur DNS sous la distrib debian squeeze:
nom: server-debian | IP: 192.168.0.17 | domaine: toto.com
Les fichiers de configurations sont les suivants:/etc/resolv.conf:search toto.com
nameserver 192.168.0.17
#nameserver 192.168.0.254
/etc/host.conf:
order hosts, bind
multi on
/etc/hosts:
127.0.0.1 localhost
127.0.1.1 debian-server.toto.com debian-server
192.168.0.17 debian-server.toto.com debian-server
192.168.0.18 debian-client.toto.com debian-client
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
/etc/hostname:
/etc/bind/named.conf:
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
/etc/bind/named.conf.local:
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
include "/etc/bind/zones.rfc1918";
zone "toto.com" {
type master;
file "/etc/bind/db.toto.com";
};
zone "0.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.toto.com.inv";
};
/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 {
// 0.0.0.0;
// };
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
listen-on {ANY;};
allow-recursion { 127.0.0.1; };
};
/etc/bind/db.toto.com
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA debian-server.toto.com. root.toto.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ; Negative Cache TTL
);
debian-server.toto.com IN A 192.168.0.17
/etc/bind/db.toto.com.inv
;
; BIND reverse data file for broadcast zone
;
$TTL 604800
@ IN SOA debian-server.toto.com root.toto.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ; Negative Cache TTL
);
; Bind reverse data file for toto.com zone
@ IN NS debian-server.
17 IN PTR debian-server.toto.com.
18 IN PTR debian-client.toto.com.
Voici les commandes que j'ai exécuté pour tester mon serveur:
named-checkconf -z
zone 10.in-addr.arpa/IN: loaded serial 1
zone 16.172.in-addr.arpa/IN: loaded serial 1
zone 17.172.in-addr.arpa/IN: loaded serial 1
zone 18.172.in-addr.arpa/IN: loaded serial 1
zone 19.172.in-addr.arpa/IN: loaded serial 1
zone 20.172.in-addr.arpa/IN: loaded serial 1
zone 21.172.in-addr.arpa/IN: loaded serial 1
zone 22.172.in-addr.arpa/IN: loaded serial 1
zone 23.172.in-addr.arpa/IN: loaded serial 1
zone 24.172.in-addr.arpa/IN: loaded serial 1
zone 25.172.in-addr.arpa/IN: loaded serial 1
zone 26.172.in-addr.arpa/IN: loaded serial 1
zone 27.172.in-addr.arpa/IN: loaded serial 1
zone 28.172.in-addr.arpa/IN: loaded serial 1
zone 29.172.in-addr.arpa/IN: loaded serial 1
zone 30.172.in-addr.arpa/IN: loaded serial 1
zone 31.172.in-addr.arpa/IN: loaded serial 1
zone 168.192.in-addr.arpa/IN: loaded serial 1
zone toto.com/IN: has no NS records <----erreur?
zone toto.com/IN: not loaded due to errors. <----erreur?
_default/toto.com/IN: bad zone <----erreur?
zone 0.168.192.in-addr.arpa/IN: loaded serial 1
zone localhost/IN: loaded serial 2
zone 127.in-addr.arpa/IN: loaded serial 1
zone 0.in-addr.arpa/IN: loaded serial 1
zone 255.in-addr.arpa/IN: loaded serial 1
named-checkzone toto.com /etc/bind/db.toto.com
zone toto.com/IN: has no NS records
zone toto.com/IN: not loaded due to errors.
nslookup
> server 192.168.0.17
Default server: 192.168.0.17
Address: 192.168.0.17#53
> server server-debian
nslookup: couldn't get address for 'server-debian': not found
> server-debian.toto.com
Server: 192.168.0.17
Address: 192.168.0.17#53
** server can't find server-debian.toto.com.toto.com: SERVFAIL
nslookup 192.168.0.17
Server: 192.168.0.17
Address: 192.168.0.17#53
17.0.168.192.in-addr.arpa name = debian-server.toto.com.
J'ai beau re(rerere...)lire mes fichiers conf, je ne sais plus quoi faire pour obtenir un serveur DNS local fonctionnel.
Dernière modification par cyberfrk (04-03-2013 17:31:34)