Problème de configuration DNS
par vct le 11/04/2008
Bonjour, je suis développeur web et je souhaite faire un DNS or je ne suis pas un spécialiste mais j'aime le réseau.
Je n'arrive pas à configurer mon DNS.
J'obtiens des erreurs quand je fais des nslookup et des host nomdemachine.
Je crois c'est pas la peine de trop baratiner voici les fichiers de configuration, si y aurait un courageux pour m'expliquer pourquoi ça ne marche pas.
En tant cas merci bcp d'avance, perso je n'arrive pas à avancer après vérif et revérfi.
ma machine s'appelle "debian" et mon DNS que je souhaite faire est somex.local*
fichier hosts
127.0.0.1 localhost
127.0.1.1 debian.SomexFR.local debian
192.168.1.55 debian.somex.local debian
# 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
ff02::3 ip6-allhosts
fichier resolv.conf
search somex.local
nameserver 192.168.1.55
fichier 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";
};
zone "somex.local" {
type master;
file "/etc/bind/db.somex.local";
forwarders{};
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.somex.local.inv";
forwarders{};
};
// 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";
fichier named.conf.options
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you might need to uncomment the query-source
// directive below. Previous versions of BIND always asked
// questions using port 53, but BIND 8.1 and later use an unprivileged
// port by default.
// query-source address * port 53;
// 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 {
80.10.246.2;
80.10.246.129;
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
fichier db.somex.local
$TTL 604800 @ IN SOA debian.somex.local. root.somex.local. (
20080410 ; serial
604800 ; refresh
86400 ; retry
2419200 ; expire
604800 ) ; minimum
NS debian.somex.local.
debian A 192.168.1.55
debian HINFO "serveur debian"
PRODUCTION1 A 192.168.1.109
webmaster A 192.168.1.110
pop CNAME debian
smtp CNAME debian
www CNAME debian
ldap CNAME debian
ficher db.somex.local.inv
$TTL 604800 @ IN SOA debian.somex.local. root.somex.local. (
20080410
604800
86400
2419200
604800 )
NS debian.somex.local.
55 PTR debian.somex.local.
109 PTR PRODUCTION1.somex.local.
110 PTR webmaster.somex.local.
Re: Problème de configuration DNS
par MadOne le 08/05/2008
Salut déja tu n'as a mettre les fowarders dans le fichier de named.conf :
zone "somex.local" {
type master;
file "/etc/bind/db.somex.local";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.somex.local.inv";
};
Ton resolv.conf devra plutôt ressembler a cela si ton DNS tourne en local sur la machine:
search somex.local
nameserver 127.0.0.1
De plus tes fichier de db.* Je te conseille ceci :
fichier db.somex.local
$TTL 604800 @ IN SOA debian.somex.local. root.somex.local. (
20080410 ; serial
604800 ; refresh
86400 ; retry
2419200 ; expire
604800 ) ; minimum
@ NS debian.somex.local.
@ MX 10 mail.somex.local.
@ A 192.168.1.55
debian A 192.168.1.55
PRODUCTION1 A 192.168.1.109
pop CNAME debian
smtp CNAME debian
www CNAME debian
ldap CNAME debian
ficher db.somex.local.inv
$TTL 604800 @ IN SOA debian.somex.local. root.somex.local. (
20080410
604800
86400
2419200
604800 )
@ NS debian.somex.local.
@ MX 10 mail.somex.local.
55 PTR debian.somex.local.
109 PTR PRODUCTION1.somex.local.
Est ce que webmaster est une machine?? sinon ne la met pas ici.
fichier hosts
127.0.0.1 localhost debian.somex.local debian
127.0.1.1 debian.SomexFR.local --> ??? C'est pour apache? VirtualHost?
Sinon tu peux retirer.
Si oui je te conseille de mettre un CNAME avec ce nom e dans ton fichier /etc/nsswitch.conf
hosts: dns files
networks: files
OK normalement cela doit marcher reload ton DNS et effectue ces commandes:
host -t A nomdelamchine
host -t A @IP
host -t MX somex.local
(Cela doit te renvoyer l'adresse de mail.somex.local