From a4e0bf77717272cb537de8543caa814c05bcb5de Mon Sep 17 00:00:00 2001 From: "timeo.collado" Date: Mon, 3 Feb 2025 10:52:22 +0100 Subject: [PATCH] Fichier du DNS2 --- sisr1/tp02-dns/dns2/db.sio-tc.lan | 18 +++++++++++++++++ sisr1/tp02-dns/dns2/db.sio-tc.lan.rev | Bin 0 -> 676 bytes sisr1/tp02-dns/dns2/named.conf | 11 +++++++++++ sisr1/tp02-dns/dns2/named.conf.local | 25 ++++++++++++++++++++++++ sisr1/tp02-dns/dns2/named.conf.options | 26 +++++++++++++++++++++++++ sisr1/tp02-dns/dns2/resolv.conf | 3 +++ 6 files changed, 83 insertions(+) create mode 100644 sisr1/tp02-dns/dns2/db.sio-tc.lan create mode 100644 sisr1/tp02-dns/dns2/db.sio-tc.lan.rev create mode 100644 sisr1/tp02-dns/dns2/named.conf create mode 100644 sisr1/tp02-dns/dns2/named.conf.local create mode 100644 sisr1/tp02-dns/dns2/named.conf.options create mode 100644 sisr1/tp02-dns/dns2/resolv.conf diff --git a/sisr1/tp02-dns/dns2/db.sio-tc.lan b/sisr1/tp02-dns/dns2/db.sio-tc.lan new file mode 100644 index 0000000..b39fa8d --- /dev/null +++ b/sisr1/tp02-dns/dns2/db.sio-tc.lan @@ -0,0 +1,18 @@ +$ORIGIN . +$TTL 604800 ; 1 week +sio-tc.lan IN SOA dns1-tc.sio-tc.lan. root.dns1-tc.sio-tc.lan. ( + 2 ; serial + 604800 ; refresh (1 week) + 86400 ; retry (1 day) + 2419200 ; expire (4 weeks) + 604800 ; minimum (1 week) + ) + NS dns1-tc.sio-tc.lan. + A 127.0.0.1 +$ORIGIN sio-tc.lan. +deb-dhcp-tc A 192.168.0.160 +dhcp CNAME deb-dhcp-tc +dns1 CNAME dns1-tc +dns1-tc A 192.168.0.161 +dns2 CNAME dns2-tc +dns2-tc A 192.168.0.162 diff --git a/sisr1/tp02-dns/dns2/db.sio-tc.lan.rev b/sisr1/tp02-dns/dns2/db.sio-tc.lan.rev new file mode 100644 index 0000000000000000000000000000000000000000..8d3dfebdcfcaade48d03dc7ba2bdd8889fbca244 GIT binary patch literal 676 zcmZQzU|?ckU|>w2-SP%VBZGVfMg}&Z0H;+0kYr?#U^HMhG_znfv@~MR%+pOwNhxAU zEGkH3U~ptl$tyP0ElFl8&ddi=%sGj93@kx1;{Cc ztrNjvsyomG9wZZFfX+3*>1a{zl++~Ml#Jv8kc)v12fG@m-3^N|hB%GE-%_I91><61U&MMuPl~ G%SZr2V~MQ* literal 0 HcmV?d00001 diff --git a/sisr1/tp02-dns/dns2/named.conf b/sisr1/tp02-dns/dns2/named.conf new file mode 100644 index 0000000..bc71baa --- /dev/null +++ b/sisr1/tp02-dns/dns2/named.conf @@ -0,0 +1,11 @@ +// This is the primary configuration file for the BIND DNS server named. +// +// Please read /usr/share/doc/bind9/README.Debian 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"; +include "/etc/bind/named.conf.local"; +include "/etc/bind/named.conf.default-zones"; diff --git a/sisr1/tp02-dns/dns2/named.conf.local b/sisr1/tp02-dns/dns2/named.conf.local new file mode 100644 index 0000000..b5d048a --- /dev/null +++ b/sisr1/tp02-dns/dns2/named.conf.local @@ -0,0 +1,25 @@ +// +// Do any local configuration here +// + + // zone directe + zone "sio-tc.lan" { + type slave; + file "/etc/bind/db.sio-tc.lan"; + masters { 192.168.0.161; }; + masterfile-format text; + }; + + // zone inverse + zone "0.168.192.in-addr.arpa" { + type slave; + file "/etc/bind/db.sio-tc.lan.rev"; + notify no; + masters { 192.168.0.161; }; + }; + + +// Consider adding the 1918 zones here, if they are not used in your +// organization +//include "/etc/bind/zones.rfc1918"; + diff --git a/sisr1/tp02-dns/dns2/named.conf.options b/sisr1/tp02-dns/dns2/named.conf.options new file mode 100644 index 0000000..107b47d --- /dev/null +++ b/sisr1/tp02-dns/dns2/named.conf.options @@ -0,0 +1,26 @@ +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 { + 192.168.0.121; //ici forwader DNS redouane + 192.168.0.141; //ici forwader DNS aboulaï + 10.121.38.7; //ici forwader 1 + }; + + //======================================================================== + // If BIND logs error messages about the root key being expired, + // you will need to update your keys. See https://www.isc.org/bind-keys + //======================================================================== + dnssec-validation no; + + listen-on-v6 { any; }; +}; diff --git a/sisr1/tp02-dns/dns2/resolv.conf b/sisr1/tp02-dns/dns2/resolv.conf new file mode 100644 index 0000000..8e2a38a --- /dev/null +++ b/sisr1/tp02-dns/dns2/resolv.conf @@ -0,0 +1,3 @@ +domain sio-tc.lan +search sio-tc.lan +nameserver 127.0.0.1