From 748e95941950dc574cfc53ddd0157ef774676969 Mon Sep 17 00:00:00 2001 From: "jeremy.thomas" Date: Mon, 17 Feb 2025 09:35:50 +0100 Subject: [PATCH] Ajout des fichiers du srv-dns2 --- .../srv-dns2/cartes_reseau/interfaces | 18 ++++++++++++ .../srv-dns2/dns/db.monlabo.lan | 28 +++++++++++++++++++ .../srv-dns2/dns/db.monlabo.lan.rev | 26 +++++++++++++++++ .../srv-dns2/dns/named.conf.local | 24 ++++++++++++++++ .../srv-dns2/dns/named.conf.options | 24 ++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 sisr1/tp03-reseau-prive/srv-dns2/cartes_reseau/interfaces create mode 100644 sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan create mode 100644 sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan.rev create mode 100644 sisr1/tp03-reseau-prive/srv-dns2/dns/named.conf.local create mode 100644 sisr1/tp03-reseau-prive/srv-dns2/dns/named.conf.options diff --git a/sisr1/tp03-reseau-prive/srv-dns2/cartes_reseau/interfaces b/sisr1/tp03-reseau-prive/srv-dns2/cartes_reseau/interfaces new file mode 100644 index 0000000..aa7da60 --- /dev/null +++ b/sisr1/tp03-reseau-prive/srv-dns2/cartes_reseau/interfaces @@ -0,0 +1,18 @@ +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +source /etc/network/interfaces.d/* + +# The loopback network interface +auto lo +iface lo inet loopback + +# The primary network interface +allow-hotplug enp0s3 +iface enp0s3 inet dhcp + +# Assignation static IP adresse +#auto enp0s3 +#iface enp0s3 inet static +# address 172.16.0.200/24 +# gateway 172.16.0.1 diff --git a/sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan b/sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan new file mode 100644 index 0000000..e58cd09 --- /dev/null +++ b/sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan @@ -0,0 +1,28 @@ +; +; BIND data file for local loopback interface +; +$TTL 604800 +@ IN SOA srv-service.monlabo.lan. root.srv-service.monlabo.lan. ( + 2 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL + NS srv-service.monlabo.lan. + NS srv-dns2.monlabo.lan. +srv-service.monlabo.lan. A 172.16.0.254 +srv-dns2.monlabo.lan. A 172.16.0.253 +srv-admin-jt.monlabo.lan. A 172.16.0.1 + +srvdhcp IN CNAME srv-service.monlabo.lan. +dhcp IN CNAME srv-service.monlabo.lan. +srvdns IN CNAME srv-service.monlabo.lan. +dns IN CNAME srv-service.monlabo.lan. +srvdns1 IN CNAME srv-service.monlabo.lan. +dns1 IN CNAME srv-service.monlabo.lan. +srvdns2 IN CNAME srv-dns2.monlabo.lan. +dns2 IN CNAME srv-dns2.monlabo.lan. +srvadmin IN CNAME srv-admin-jt.monlabo.lan. +router IN CNAME srv-admin-jt.monlabo.lan. +gateway IN CNAME srv-admin-jt.monlabo.lan. + diff --git a/sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan.rev b/sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan.rev new file mode 100644 index 0000000..b439fde --- /dev/null +++ b/sisr1/tp03-reseau-prive/srv-dns2/dns/db.monlabo.lan.rev @@ -0,0 +1,26 @@ +$ORIGIN . +$TTL 604800 ; 1 week +0.16.172.in-addr.arpa IN SOA srv-service.monlabo.lan. root.srv-service.monlabo.lan. ( + 2 ; serial + 604800 ; refresh (1 week) + 86400 ; retry (1 day) + 2419200 ; expire (4 weeks) + 604800 ; minimum (1 week) + ) + NS srv-dns2.monlabo.lan. + NS srv-service.monlabo.lan. +$ORIGIN 0.16.172.in-addr.arpa. +1 PTR srv-admin-jt.monlabo.lan. +253 PTR srv-dns2.monlabo.lan. +254 PTR svr-service.monlabo.lan. +dhcp CNAME srv-service.monlabo.lan. +dns CNAME srv-service.monlabo.lan. +dns1 CNAME srv-service.monlabo.lan. +dns2 CNAME srv-dns2.monlabo.lan. +gateway CNAME srv-admin-jt.monlabo.lan. +router CNAME srv-admin-jt.monlabo.lan. +srvadmin CNAME srv-admin-jt.monlabo.lan. +srvdhcp CNAME srv-service.monlabo.lan. +srvdns CNAME srv-service.monlabo.lan. +srvdns1 CNAME srv-service.monlabo.lan. +srvdns2 CNAME srv-dns2.monlabo.lan. diff --git a/sisr1/tp03-reseau-prive/srv-dns2/dns/named.conf.local b/sisr1/tp03-reseau-prive/srv-dns2/dns/named.conf.local new file mode 100644 index 0000000..0eee467 --- /dev/null +++ b/sisr1/tp03-reseau-prive/srv-dns2/dns/named.conf.local @@ -0,0 +1,24 @@ +// +// Do any local configuration here +// + // zone direct + zone "monlabo.lan" { + type slave; + file "/etc/bind/db.monlabo.lan"; + masters {172.16.0.254;} ; + masterfile-format text; + }; + + // zone inverse + zone "0.16.172.in-addr.arpa" { + type slave; + notify no; + file "/etc/bind/db.monlabo.lan.rev"; + masters { 172.16.0.254; } ; + masterfile-format text; + }; + +// Consider adding the 1918 zones here, if they are not used in your +// organization +//include "/etc/bind/zones.rfc1918"; + diff --git a/sisr1/tp03-reseau-prive/srv-dns2/dns/named.conf.options b/sisr1/tp03-reseau-prive/srv-dns2/dns/named.conf.options new file mode 100644 index 0000000..4778d18 --- /dev/null +++ b/sisr1/tp03-reseau-prive/srv-dns2/dns/named.conf.options @@ -0,0 +1,24 @@ +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 { + // 0.0.0.0; + // }; + + //======================================================================== + // 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; }; +};