Installation d'un serveur dns sous ubuntu

Fermé
jihed mohamed Messages postés 1 Date d'inscription lundi 23 janvier 2012 Statut Membre Dernière intervention 23 janvier 2012 - 23 janv. 2012 à 14:32
p_oum Messages postés 963 Date d'inscription mardi 6 mai 2008 Statut Membre Dernière intervention 2 avril 2012 - 23 janv. 2012 à 19:47
Bonjour à tous les CCM'ers,
j'ai une nom de domain"test.lan",
je veux gérer moimeme mon sercveur de DNS,
j'ai donc installé BIND9
voici donc mon fichier 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 "test.lan" {
type master;
file "/etc/bind/db.test.lan";
};
zone "1.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.192";
};

voici mon fichier named.conf.options

options {
directory "/var/cache/bind";
allow-recursion { localhost; };
// 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 {
// 0.0.0.0;
// };

auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};

et enfin voici mon fichier db.test.com

;
; 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

le probléme quand je fait la commande "ping test.lan" il me répon par "ping: unknown host test.lan"


Quelqu'un a-t-il une idée?
merci d'avance à tous et toutes




A voir également:

1 réponse

p_oum Messages postés 963 Date d'inscription mardi 6 mai 2008 Statut Membre Dernière intervention 2 avril 2012 87
23 janv. 2012 à 19:47
Bonjour,

test.lan est le nom de ton domaine donc s'il y a n'y a pas de redirection dans ton fichier de zone vers une machine c'est normal que tu n'as pas de réponse

Ensuite ton fichier de zone n'est pas correct, il doit ressembler a ceci:

$TTL 86400
@ IN SOA mondns.test.lan. root.test.lan. (
2012011601 ; Serial
21600 ; Refresh
3600 ; Retry
604800 ; Expire
86400 ) ; Minimum

;DNS

IN NS mondns.test.lan.

;Host
;Example
;servername IN A IP
@ IN A AdresseIP_d'une_des_machines_du_réseau (pour que ping test.lan réponde)
mamachine IN A AdresseIP


Ensuite redémarre bind

Test si ca fonctionne avec la commande dig test.lan
Tu peux également regarder dans les log de bind pour vérifier si tu as des erreurs lors du redémarrage de bind
0