diff --git a/Bundler/bind.xml b/Bundler/bind.xml index 2ccfaf6..f9fe4c8 100644 --- a/Bundler/bind.xml +++ b/Bundler/bind.xml @@ -11,6 +11,9 @@ + + + diff --git a/Cfg/etc/bind/db.fake/db.fake b/Cfg/etc/bind/db.fake/db.fake new file mode 100644 index 0000000..ae6e403 --- /dev/null +++ b/Cfg/etc/bind/db.fake/db.fake @@ -0,0 +1,14 @@ +$TTL 7200 + +@ IN SOA sable.crans.org root.crans.org ( + 1 ; serial + 3600 ; refresh (1hr) + 1800 ; retry (30mn) + 604800 ; expire (7dy) + 1 ; TTL (1s) + ) + +@ IN NS 10.51.0.1 + +@ IN A 10.51.0.1 +* IN A 10.51.0.1 diff --git a/Cfg/etc/bind/db.fake/info.xml b/Cfg/etc/bind/db.fake/info.xml new file mode 100644 index 0000000..2ad4214 --- /dev/null +++ b/Cfg/etc/bind/db.fake/info.xml @@ -0,0 +1,3 @@ + + + diff --git a/Cfg/etc/bind/named.conf.local/named.conf.local.G99_vlan-radin b/Cfg/etc/bind/named.conf.local/named.conf.local.G99_vlan-radin new file mode 100644 index 0000000..cfdfc9a --- /dev/null +++ b/Cfg/etc/bind/named.conf.local/named.conf.local.G99_vlan-radin @@ -0,0 +1,52 @@ +// Fichier gere par BCfg2 (plugin Cfg) +// +// A ne modifier que sur vert + +include "/etc/bind/zones.rfc1918"; + +view "accueilview" { + match-clients { "accueil"; }; + + recursion no; + fetch-glue no; + + zone "." { + type master; + file "/etc/bind/db.fake"; + }; +}; + +view "others" { + + match-clients { any; }; + // zones crans + include "/etc/bind/generated/zones_crans"; + + // anti SPAM + // Rajout pour générer le forward vers ariane pour la zone rbl-plus.mail-abuse.org --Nico 21/04/02 + zone "rbl-plus.mail-abuse.org" { + type forward; + forward only; + forwarders { 138.231.176.4 ; }; + }; + + // la télé + zone "tv.crans.org" { + type slave; + file "/etc/bind/generated/db.tv.crans.org"; + masters { 138.231.136.193; }; + }; + + zone "239.in-addr.arpa" { + type slave; + file "/etc/bind/generated/db.239.in-addr.arpa"; + masters { 138.231.136.193; }; + }; +}; + +// bricoles de config en plus +include "/etc/bind/rndc.key"; + +controls { + inet 127.0.0.1 allow { 127.0.0.1; } keys { "key"; }; +}; diff --git a/Python/etc/bind/named.conf.options b/Python/etc/bind/named.conf.options index 1949516..ab76764 100644 --- a/Python/etc/bind/named.conf.options +++ b/Python/etc/bind/named.conf.options @@ -1,13 +1,23 @@ +# -*- mode: python; encoding: utf-8 -*- + info["owner"] = "root" info["group"] = "bind" info["perms"] = 0644 -@// Fichier gere par BCfg2 (Plugin Python) -@// -@// A ne modifier que sur vert -@ +comment_start = "//" + +header("Options de Bind9") + +comment("Listes d'accès") +if has("vlan-radin"): + @acl "radins" { 10.42.0.0/16; }; + @acl "accueil" { 10.51.0.0/16; }; +@acl "crans" { 138.231.136.0/21; 138.231.144.0/21; }; +@acl "cransadm" { 10.231.136.0/24; }; + + @options { -@ directory "/var/cache/bind"; +@ directory "/var/cache/bind"; @ recursive-clients 5000; @ @@ -22,17 +32,20 @@ if has("dns-primary"): @ 138.231.148.0/22; // wifi @ 10.231.136.0/24; // adm @ 138.231.176.4; // ariane -@ }; +@ }; @ auth-nxdomain no; # conform to RFC1035 @ if not has("dns-secondary-no-forward"): - @ //ne pas modifier le commentaire de fin de ligne suivant - @ //traitement automatique pour la connexion de secours - @ //(ligne decommentee en mode secours) + @ // Ne pas modifier le commentaire de fin de ligne suivant, + @ // traitement automatique pour la connexion de secours + @ // (ligne decommentee automatiquement en mode secours) @// forwarders { 138.231.136.14; } ; #POUR SECOURS @ -@ allow-recursion {127.0.0.1; 10.231.136.0/24; 138.231.136.0/21; 138.231.144.0/21;}; +if not has("vlan-radin"): + @ allow-recursion {"localnets"; "cransadm"; "crans";}; +else + @ allow-recursion {"localnets"; "cransadm"; "crans"; "radins";}; @};