[bind] On génère named.conf.notify aussi pour tv.crans.org. On en profite pour le générer directement à partir de config.py
Ignore-this: 1e60e86462ba439552c78a76728f0ece darcs-hash:20130128015929-3a55a-7589cdf931de406b49f27f75118a7aad449e833f.gz
This commit is contained in:
parent
9ac9a4749e
commit
7f8ff30c10
5 changed files with 31 additions and 20 deletions
22
Python/etc/bind/named.conf.notify
Normal file
22
Python/etc/bind/named.conf.notify
Normal file
|
@ -0,0 +1,22 @@
|
|||
# -*- mode: python; encoding: utf-8 -*-
|
||||
|
||||
info["owner"] = "root"
|
||||
info["group"] = "bind"
|
||||
info["perms"] = 0644
|
||||
|
||||
comment_start = "//"
|
||||
|
||||
header("Options de Bind9")
|
||||
|
||||
import config
|
||||
|
||||
def notify(ips):
|
||||
print " also-notify { \n %s;\n };" % ';\n '.join(ips)
|
||||
|
||||
|
||||
|
||||
|
||||
if has("dns-tv"):
|
||||
notify(config.dns.slaves_tv)
|
||||
if has("dns-primary"):
|
||||
notify(config.dns.slaves + [config.dns.parent])
|
|
@ -27,9 +27,6 @@ print 'acl "cransadm" { %s; };' % '; '.join(config.prefix['adm'] + config.NETs['
|
|||
@ directory "/var/cache/bind";
|
||||
@
|
||||
|
||||
if has("dns-primary"):
|
||||
@ include "/etc/bind/named.conf.notify";
|
||||
|
||||
|
||||
if has("dns-recursif") or has("dns-forward-only"):
|
||||
zones=["127.0.0.1", "crans", "cransadm"]
|
||||
|
@ -47,13 +44,16 @@ else:
|
|||
@ allow-query-cache { 127.0.0.1; };
|
||||
@ allow-recursion { 127.0.0.1; };
|
||||
if has("dns-primary") or has("dns-tv"):
|
||||
@ include "/etc/bind/named.conf.notify";
|
||||
@ allow-transfer {
|
||||
@ 127.0.0.1;
|
||||
@ 138.231.136.0/21; // fixes
|
||||
@ 138.231.148.0/22; // wifi
|
||||
@ 10.231.136.0/24; // adm
|
||||
print " %s;" % ';\n '.join(config.dns.slaves)
|
||||
print " %s;" % config.dns.parent
|
||||
if has("dns-primary"):
|
||||
print " %s;" % ';\n '.join(config.dns.slaves + [config.dns.parent])
|
||||
if has("dns-tv"):
|
||||
print " %s;" % ';\n '.join(config.dns.slaves_tv)
|
||||
@ };
|
||||
@ allow-query { any; };
|
||||
@ auth-nxdomain no; # conform to RFC1035
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue