diff --git a/sisr1/tp02-dns/dns1/db.sio-tg.lan b/sisr1/tp02-dns/dns1/db.sio-tg.lan new file mode 100644 index 0000000..efe391e --- /dev/null +++ b/sisr1/tp02-dns/dns1/db.sio-tg.lan @@ -0,0 +1,19 @@ +; +; BIND data file for local loopback interface +; +$TTL 604800 +@ IN SOA dns1-tg.sio-tg.lan. root.dns1-tg.sio-tg.lan. ( + 2 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL +@ NS dns1-tg.sio-tg.lan. +dns2-tg.sio-tg.lan IN A 192.168.0.122 +dns1-tg.sio-tg.lan. IN A 192.168.0.121 +deb-dhcp-tg.sio-tg.lan. IN A 192.168.0.120 + + +@ IN NS localhost. +@ IN A 127.0.0.1 +@ IN A 192.168.0.120 diff --git a/sisr1/tp02-dns/dns1/db.sio-tg.lan.rev b/sisr1/tp02-dns/dns1/db.sio-tg.lan.rev new file mode 100644 index 0000000..ec35dbe --- /dev/null +++ b/sisr1/tp02-dns/dns1/db.sio-tg.lan.rev @@ -0,0 +1,15 @@ +; +; BIND data file for local loopback interface +; +$TTL 604800 +@ IN SOA dns-tg.sio-tg.lan. root.dns-tg.sio-tg.lan. ( + 2 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL +; + IN NS dns1-tg.sio.lan. + +120 IN PTR deb-dhcp-tg.sio-tg.lan. +121 IN PTR dns1-tg.sio-tg.lan. diff --git a/sisr1/tp02-dns/dns1/interfaces b/sisr1/tp02-dns/dns1/interfaces new file mode 100644 index 0000000..038c34b --- /dev/null +++ b/sisr1/tp02-dns/dns1/interfaces @@ -0,0 +1,16 @@ +# 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 +iface enp0s3 inet static + address 192.168.0.121/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..be43624 --- /dev/null +++ b/sisr1/tp02-dns/dns1/named.conf.local @@ -0,0 +1,12 @@ +// zone directe +zone "sio-tg.lan" { + type master; + file "/etc/bind/db.sio-tg.lan"; +}; + +// zone inverse +zone "0.168.192.in-addr.arpa" { + type master; + notify no; + file "/etc/bind/db.sio-tg.lan.rev"; +}; diff --git a/sisr1/tp02-dns/dns1/resolv.conf b/sisr1/tp02-dns/dns1/resolv.conf new file mode 100644 index 0000000..c38b105 --- /dev/null +++ b/sisr1/tp02-dns/dns1/resolv.conf @@ -0,0 +1,4 @@ +domain sio-tg.lan +search sio-tg.lan +nameserver 192.168.0.121 +nameserver 10.121.38.8