From 08ddca82ee6cd7f56250dfb88cf18e5aea10393b Mon Sep 17 00:00:00 2001 From: "aboulai.bayo" Date: Mon, 3 Feb 2025 10:59:42 +0100 Subject: [PATCH] Fichier du DNS1 --- sisr1/tp02-dns/dns1/db.sio-ab.lan | 19 +++++++++++++++++++ sisr1/tp02-dns/dns1/db.sio-ab.lan.rev | 20 ++++++++++++++++++++ sisr1/tp02-dns/dns1/named.conf | 11 +++++++++++ sisr1/tp02-dns/dns1/named.conf.local | 19 +++++++++++++++++++ sisr1/tp02-dns/dns1/named.conf.options | 26 ++++++++++++++++++++++++++ sisr1/tp02-dns/dns1/resolv.conf | 4 ++++ 6 files changed, 99 insertions(+) create mode 100644 sisr1/tp02-dns/dns1/db.sio-ab.lan create mode 100644 sisr1/tp02-dns/dns1/db.sio-ab.lan.rev create mode 100644 sisr1/tp02-dns/dns1/named.conf create mode 100644 sisr1/tp02-dns/dns1/named.conf.local create mode 100644 sisr1/tp02-dns/dns1/named.conf.options create mode 100644 sisr1/tp02-dns/dns1/resolv.conf diff --git a/sisr1/tp02-dns/dns1/db.sio-ab.lan b/sisr1/tp02-dns/dns1/db.sio-ab.lan new file mode 100644 index 0000000..f94c9d8 --- /dev/null +++ b/sisr1/tp02-dns/dns1/db.sio-ab.lan @@ -0,0 +1,19 @@ +; +; BIND data file for local loopback interface +; +$TTL 604800 +@ IN SOA dns1-ab-sio.lan root.dns1-ab-sio-ab.lan. ( + 2 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL +; +@ IN NS dns1-ab.sio-ab.lan. +@ IN A 127.0.0.1 +dns1-ab.sio-ab.lan. IN A 192.168.0.141 +deb-dhcp-ab IN A 192.168.0.140 +;@ IN AAAA ::1 +dhcp CNAME deb-dhcp-ab +dns1 CNAME dns1-ab +dns2 CNAME dns2-ab diff --git a/sisr1/tp02-dns/dns1/db.sio-ab.lan.rev b/sisr1/tp02-dns/dns1/db.sio-ab.lan.rev new file mode 100644 index 0000000..9e8a647 --- /dev/null +++ b/sisr1/tp02-dns/dns1/db.sio-ab.lan.rev @@ -0,0 +1,20 @@ +; +; BIND data file for local loopback interface +; +$TTL 604800 +@ IN SOA dns1-ab-sio.lan root.dns1-ab-sio-ab.lan. ( + 2 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL +; +@ IN NS dns1-ab.sio-ab.lan. +@ IN A 127.0.0.1 +;@ IN AAAA ::1 +140 IN PTR dns1-ab.sio-ab.lan. +141 IN PTR deb-dhcp-ab.sio-ab.lan +142 IN PTR dns2-ab.sio-ab.lan. +dhcp CNAME deb-dhcp-ab +dns1 CNAME dns1-ab +dns2 CNAME dns2-ab diff --git a/sisr1/tp02-dns/dns1/named.conf b/sisr1/tp02-dns/dns1/named.conf new file mode 100644 index 0000000..bc71baa --- /dev/null +++ b/sisr1/tp02-dns/dns1/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/dns1/named.conf.local b/sisr1/tp02-dns/dns1/named.conf.local new file mode 100644 index 0000000..427be7d --- /dev/null +++ b/sisr1/tp02-dns/dns1/named.conf.local @@ -0,0 +1,19 @@ +// +// Do any local configuration here +// zone directe + zone "sio-ab.lan" { + type master; + file "/etc/bind/db.sio-ab.lan"; + }; + + // zone inverse + zone "0.168.192.in-addr.arpa" { + type master; + notify no; + file "/etc/bind/db.sio-ab.lan.rev"; + }; + +// 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/dns1/named.conf.options b/sisr1/tp02-dns/dns1/named.conf.options new file mode 100644 index 0000000..57dd75e --- /dev/null +++ b/sisr1/tp02-dns/dns1/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.161; // dns timéo + 192.168.0.121; // dns redouane + 10.121.38.7; + }; + + //======================================================================== + // 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 auto; + + listen-on-v6 { any; }; +}; diff --git a/sisr1/tp02-dns/dns1/resolv.conf b/sisr1/tp02-dns/dns1/resolv.conf new file mode 100644 index 0000000..b742088 --- /dev/null +++ b/sisr1/tp02-dns/dns1/resolv.conf @@ -0,0 +1,4 @@ +domain sio-ab.lan +search sio-ab.lan +nameserver 127.0.0.1 +nameserver 10.121.38.8