🔧 1.
Préparation du Serveur DNS (SRV-DC10)
Adresse IP : 192.168.83.10
Nom du serveur DNS : srv-dc10.local
Étape 1 : Installation du service BIND9
sudo apt update
sudo apt install bind9 bind9utils bind9-doc -y
Étape 2 : Configuration du fichier de zone directe
Créez un fichier de zone pour votre domaine (ex: local) :
Éditez /etc/bind/named.conf.local :
sudo nano /etc/bind/named.conf.local
Ajoutez :
zone "local" {
type master;
file "/etc/bind/db.local";
};
zone "83.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192";
};
📁 2. Création des fichiers de zone
Fichier de zone directe (/etc/bind/db.local)
sudo cp /etc/bind/db.local /etc/bind/db.local
sudo nano /etc/bind/db.local
Remplacez par exemple :
$TTL 604800
@ IN SOA srv-dc10.local. root.local. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN NS srv-dc10.local.
srv-dc10 IN A 192.168.83.10
pc1 IN A 192.168.83.11
pc2 IN A 192.168.83.12
pc3 IN A 192.168.83.13
pc4 IN A 192.168.83.14
srv-cs1 IN A 192.168.83.110
Fichier de zone inverse (/etc/bind/db.192)
sudo cp /etc/bind/db.127 /etc/bind/db.192
sudo nano /etc/bind/db.192
Modifiez comme suit :
$TTL 604800
@ IN SOA srv-dc10.local. root.local. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN NS srv-dc10.local.
10 IN PTR srv-dc10.local.
11 IN PTR pc1.local.
12 IN PTR pc2.local.
13 IN PTR pc3.local.
14 IN PTR pc4.local.
110 IN PTR srv-cs1.local.
🔄 3. Redémarrage et test de BIND9
sudo systemctl restart bind9
sudo systemctl enable bind9
Test du fichier de configuration :
sudo named-checkconf
sudo named-checkzone local /etc/bind/db.local
sudo named-checkzone 83.168.192.in-addr.arpa /etc/bind/db.192
🌐 4. Configuration des clients (PC1 à PC4)
Ces machines utilisent DHCP. Assurez-vous que le serveur DHCP (probablement SRV-
DC10) leur attribue 192.168.83.10 comme DNS.
Si configuration manuelle :
Éditez /etc/netplan/*.yaml ou /etc/resolv.conf :
Exemple de /etc/resolv.conf :
nameserver 192.168.83.10
Pour tester la résolution DNS :
ping pc1.local
dig pc2.local
host srv-cs1.local
🔁 5. Intégration DHCP + DNS
Sur SRV-DC10, si vous utilisez un serveur DHCP (isc-dhcp-server) :
Exemple de configuration :
sudo nano /etc/dhcp/dhcpd.conf
Ajoutez :
option domain-name "local";
option domain-name-servers 192.168.83.10;
subnet 192.168.83.0 netmask 255.255.255.0 {
range 192.168.83.11 192.168.83.20;
option routers 192.168.83.1;
}
✅ Vérification finale
Sur un PC Client (PC1, PC2, etc.) :
ping pc3.local
nslookup srv-cs1.local
dig -x 192.168.83.110
🔐 Informations de connexion mentionnées dans le schéma
SRV-DC10
o IP : 192.168.83.10/24
o DNS : 192.168.83.10
o Utilisateur : shannon
o Mot de passe : Azerty@123
SRV-CS1
o IP : 192.168.83.110/24
o Utilisateur : melchi
o Mot de passe : Azerty@123