[bind] Configuration spécifique pour le VLAN d'accueil

darcs-hash:20081209233526-ffbb2-15f8c45c7c6303e5ea951125871807d40e373dc2.gz
This commit is contained in:
Nicolas Dandrimont 2008-12-10 00:35:26 +01:00
parent e285d809b0
commit bf2adc66c3
5 changed files with 95 additions and 10 deletions

View file

@ -11,6 +11,9 @@
<Group name="dns-secondary-no-forward">
<ConfigFile name="/etc/bind/generated/zones_crans"/>
</Group>
<Group name="vlan-radin">
<ConfigFile name="/etc/bind/db.fake"/>
</Group>
<Package name="bind9"/>
<Service name="bind9"/>
</Bundle>

View file

@ -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

View file

@ -0,0 +1,3 @@
<FileInfo>
<Info owner='root' group='bind' perms='0644'/>
</FileInfo>

View file

@ -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"; };
};

View file

@ -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";};
@};