127 lines
3.4 KiB
Plaintext
127 lines
3.4 KiB
Plaintext
Host 10 :
|
|
Créez un fichiers hints-file
|
|
|
|
3600000 NS ROOT-SERV.
|
|
ROOT-SERV. 3600000 A 90.90.0.10.
|
|
|
|
|
|
Dans named.conf.default-zones on modifie pour avoir ca :
|
|
zone "." {
|
|
type hint;
|
|
file "/etc/bind/hints-file";
|
|
};
|
|
|
|
sethi:
|
|
|
|
Créez un fichier db.mos et mettre :
|
|
|
|
$TTL 3600
|
|
@ IN SOA sethi.mos. root.mos. (
|
|
2007010401 ; Serial
|
|
3600 ; Refresh [1h]
|
|
600 ; Retry [10m]
|
|
86400 ; Expire [1d]
|
|
600 ) ; Negative Cache TTL [1h]
|
|
;
|
|
@ IN NS sethi.mos.
|
|
|
|
|
|
sethi IN A 80.80.0.20
|
|
kheops IN A 80.80.0.10
|
|
host1 IN A 80.80.0.1
|
|
host2 IN A 80.80.0.2
|
|
host3 IN A 80.80.0.3
|
|
host4 IN A 80.80.0.4
|
|
host5 IN A 80.80.0.5
|
|
|
|
|
|
Créer fichier db.mos.inv et mettre :
|
|
$TTL 3600
|
|
@ IN SOA sethi.mos. root.mos. (
|
|
2007010401 ; Serial
|
|
3600 ; Refresh [1h]
|
|
600 ; Retry [10m]
|
|
86400 ; Expire [1d]
|
|
600 ) ; Negative Cache TTL [1h]
|
|
;
|
|
@ IN NS sethi.mos.
|
|
|
|
10.0.80.80.in-addr.arpa IN PTR kheops.mos.
|
|
20.0.80.80.in-addr.arpa IN PTR sethi.mos.
|
|
1.0.80.80.in-addr.arpa IN PTR host1.mos.
|
|
2.0.80.80.in-addr.arpa IN PTR host2.mos.
|
|
3.0.80.80.in-addr.arpa IN PTR host3.mos.
|
|
4.0.80.80.in-addr.arpa IN PTR host4.mos.
|
|
5.0.80.80.in-addr.arpa IN PTR host5.mos.
|
|
|
|
|
|
Dans named.conf.local
|
|
|
|
zone "mos" {
|
|
|
|
type master;
|
|
file "/etc/bind/db.mos";
|
|
};
|
|
zone "80.80.in-addr.arpa" {
|
|
|
|
type master;
|
|
file "/etc/bind/db.mos.inv";
|
|
};
|
|
|
|
/etc/resolv.conf mettre :
|
|
|
|
domain mos
|
|
nameserver 80.80.0.20
|
|
|
|
/etc/init.d/bind9 start puis ss -na pour vérifier si le port est ouvert
|
|
|
|
Sur host1 faire un ping "nom" pour vérifier si le pc communique
|
|
dig -x 80.80.0.10 pour l'inverse
|
|
|
|
|
|
ROOT-SERV
|
|
|
|
Dans named.conf.local :
|
|
|
|
zone "." {
|
|
type master;
|
|
file "/etc/bind/db.root.zone";
|
|
};
|
|
|
|
|
|
Dans db.root.zone :
|
|
|
|
$TTL 3600
|
|
@ IN SOA ROOT-SERV. root. (
|
|
2007010401 ; Serial
|
|
3600 ; Refresh [1h]
|
|
600 ; Retry [10m]
|
|
86400 ; Expire [1d]
|
|
600 ) ; Negative Cache TTL [1h]
|
|
;
|
|
@ IN NS ROOT-SERV.
|
|
|
|
|
|
ROOT-SERV IN A 90.90.0.10
|
|
mos. IN NS sethi.mos.
|
|
IN NS kheops.mos.
|
|
80.80.in-addr.arpa. IN NS sethi.mos.
|
|
IN NS kheops.mos.
|
|
sethi.mos. IN A 80.80.0.20
|
|
kheops.mos. IN A 80.80.0.10
|
|
|
|
|
|
|
|
V.Lancement et tests.
|
|
|
|
ROOT-SERV named -g
|
|
host10 named -g
|
|
sethi named -g
|
|
Tous en même temps
|
|
|
|
Dans un autre terminal
|
|
mettre dig host1.mos si sa ne fonctionne pas (problème de Clé) faire dig +cd host1.mos
|
|
pour enlever les problème de clé allez dans le premier host10 (celui qui est en named -g) et faire nano named.conf.options et mettre en commentaire dnssec-validation auto; et refaire named -g
|
|
et retesté dans le host10 dig host1.mos et ca devrait fonctionner.
|
|
dig +trace host1.mos sert a voir le chemin que fait host10 pour communiquer avec host1
|