diff --git a/SCR3.2/TP04/ddns.key b/SCR3.2/TP04/ddns.key new file mode 100644 index 0000000..e68ec6e --- /dev/null +++ b/SCR3.2/TP04/ddns.key @@ -0,0 +1,4 @@ +key "tp.scr-key" { + algorithm hmac-md5; + secret "isfoZ1noj0MAJUxImFn1ZQ=="; +}; diff --git a/SCR3.2/TP04/isis-dhcpd.conf b/SCR3.2/TP04/isis-dhcpd.conf new file mode 100644 index 0000000..f269aa0 --- /dev/null +++ b/SCR3.2/TP04/isis-dhcpd.conf @@ -0,0 +1,16 @@ +subnet 192.168.1.0 netmask 255.255.255.0 { + range 192.168.1.11 192.168.1.254; + option domain-name "tp.scr"; + option domain-name-servers 192.168.1.158; + option routers 192.168.1.10; + default-lease-time 600; + max-lease-time 7200; + zone tp.scr. + { + primary 192.168.1.158; + } + zone 1.168.192.in-addr.arpa. + { + primary 192.168.1.158; + } +} \ No newline at end of file diff --git a/SCR3.2/TP04/osiris.db.tp.scr b/SCR3.2/TP04/osiris.db.tp.scr index f1426cd..dbc2aaf 100644 --- a/SCR3.2/TP04/osiris.db.tp.scr +++ b/SCR3.2/TP04/osiris.db.tp.scr @@ -3,7 +3,7 @@ ; $TTL 604800 @ IN SOA osiris.tp.scr. root.tp.scr. ( - 2 ; Serial + 3 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire @@ -11,7 +11,4 @@ $TTL 604800 ; @ IN NS osiris.tp.scr. osiris.tp.scr. IN A 192.168.1.158 -eno.tp.scr. IN A 192.168.1.1 -owt.tp.scr. IN A 192.168.1.2 -eerht.tp.scr. IN A 192.168.1.3 -ruof.tp.scr. IN A 192.168.1.4 +isis.tp.scr. IN A 192.168.1.10 \ No newline at end of file diff --git a/SCR3.2/TP04/osiris.db.tp.scr.inv b/SCR3.2/TP04/osiris.db.tp.scr.inv index 0134bc3..5657ed8 100644 --- a/SCR3.2/TP04/osiris.db.tp.scr.inv +++ b/SCR3.2/TP04/osiris.db.tp.scr.inv @@ -3,7 +3,7 @@ ; $TTL 604800 @ IN SOA osiris.tp.scr. root.tp.scr. ( - 1 ; Serial + 2 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire @@ -11,7 +11,4 @@ $TTL 604800 ; @ IN NS osiris.tp.scr. 158.1.168.192.in-addr.arpa IN PTR osiris.tp.scr. -1.1.168.192.in-addr.arpa IN PTR eno.tp.scr. -2.1.168.192.in-addr.arpa IN PTR owt.tp.scr. -3.1.168.192.in-addr.arpa IN PTR eerht.tp.scr. -4.1.168.192.in-addr.arpa IN PTR ruof.tp.scr. +10.1.168.192.in-addr.arpa IN PTR isis.tp.scr. \ No newline at end of file diff --git a/SCR3.2/TP04/osiris.named.conf.local b/SCR3.2/TP04/osiris.named.conf.local index da55712..ae25851 100644 --- a/SCR3.2/TP04/osiris.named.conf.local +++ b/SCR3.2/TP04/osiris.named.conf.local @@ -1,19 +1,35 @@ -// -// Do any local configuration here -// +include "/etc/bind/ddns.key"; -// Consider adding the 1918 zones here, if they are not used in your -// organization -//include "/etc/bind/zones.rfc1918"; +//SANS CLE zone "tp.scr" { -type master; -file "/etc/bind/db.tp.scr"; + type master; + file "/etc/bind/db.tp.scr"; + allow-update { 192.168.1.10; }; +}; +zone "1.168.192.in-addr.arpa" +{ + type master; + file "/etc/bind/db.tp.scr.inv"; + allow-update { 192.168.1.10; }; +}; + +//Avec CLE +zone "tp.scr" +{ + type master; + // 2. Modification du chemin vers le répertoire inscriptible pour DDNS (I.4) + file "/var/cache/bind/db.tp.scr"; + // 3. Ajout de la clause allow-update avec la clé TSIG (II.2) + allow-update { key "tp.scr-key"; }; }; zone "1.168.192.in-addr.arpa" { -type master; -file "/etc/bind/db.tp.scr.inv"; + type master; + // 2. Modification du chemin vers le répertoire inscriptible pour DDNS (I.4) + file "/var/cache/bind/db.tp.scr.inv"; + // 3. Ajout de la clause allow-update avec la clé TSIG (II.2) + allow-update { key "tp.scr-key"; }; }; \ No newline at end of file