diff --git a/sisr1/tp02-dns/dns1/db.sio-ca.lan b/sisr1/tp02-dns/dns1/db.sio-ca.lan new file mode 100644 index 0000000..0a58b14 --- /dev/null +++ b/sisr1/tp02-dns/dns1/db.sio-ca.lan @@ -0,0 +1,22 @@ +; +; BIND data file for local loopback interface +; +$TTL 604800 +@ IN SOA dns1-ca.sio-ca.lan. root.dns1.sio-ca.lan. ( + 2 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL + NS dns1-ca.sio-ca.lan. +dns1-ca.sio-ca.lan. A 192.168.0.141 + + +@ IN NS localhost +localhost IN A 127.0.0.1 + +deb-dhcp-ca IN A 192.168.0.140 + +dhcp CNAME deb-dhcp-ca.sio-ca.lan. +dns CNAME dns1-ca.sio-ca.lan. + diff --git a/sisr1/tp02-dns/dns1/db.sio-ca.lan.rev b/sisr1/tp02-dns/dns1/db.sio-ca.lan.rev new file mode 100644 index 0000000..2f5dee7 --- /dev/null +++ b/sisr1/tp02-dns/dns1/db.sio-ca.lan.rev @@ -0,0 +1,24 @@ +; +; BIND data file for local loopback interface +; +$TTL 604800 +@ IN SOA dns1-ca.sio-ca.lan. root.dns1.sio-ca.lan. ( + 2 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL + NS dns1-ca.sio-ca.lan. +;dns1-ca.sio-ca.lan. A 192.168.0.141 + + +@ IN NS localhost +localhost IN A 127.0.0.1 +;deb-dhcp-ca IN A 192.168.0.140 + +141 IN PTR dns1-ca.sio-ca.lan. +140 IN PTR deb-dhcp-ca.sio-ca.lan. + +dhcp CNAME deb-dhcp-ca.sio-ca.lan. +dns CNAME dns1-ca.sio-ca.lan. + diff --git a/sisr1/tp02-dns/dns1/interfaces b/sisr1/tp02-dns/dns1/interfaces new file mode 100644 index 0000000..5b41a30 --- /dev/null +++ b/sisr1/tp02-dns/dns1/interfaces @@ -0,0 +1,15 @@ +# 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 +# This is an autoconfigured IPv6 interface +auto enp0s3 +iface enp0s3 inet static + address 192.168.0.141/24 + gateway 192.168.0.1 diff --git a/sisr1/tp02-dns/dns1/named.conf.local b/sisr1/tp02-dns/dns1/named.conf.local new file mode 100644 index 0000000..5da4622 --- /dev/null +++ b/sisr1/tp02-dns/dns1/named.conf.local @@ -0,0 +1,12 @@ +// zone directe + zone "sio-ca.lan" { + type master; + file "/etc/bind/db.sio-ca.lan"; + }; + +// zone inverse + zone "0.168.192.in-addr.arpa" { + type master; + notify no; + file "/etc/bind/db.sio-ca.lan.rev"; + }; diff --git a/sisr1/tp02-dns/dns1/resolv.conf b/sisr1/tp02-dns/dns1/resolv.conf new file mode 100644 index 0000000..336cee5 --- /dev/null +++ b/sisr1/tp02-dns/dns1/resolv.conf @@ -0,0 +1,3 @@ +domain sio-ca.lan +search sio-ca.lan +nameserver 127.0.0.1