crans_bcfg2/Python/etc/bind/db.fake
2015-05-10 15:19:17 +02:00

32 lines
678 B
Python

# -*- mode: python; encoding: utf-8 -*-
info["owner"] = "root"
info["group"] = "bind"
info["mode"] = 0644
import config
comment_start = ";"
header("Zone du dns menteur pour accueil")
@$TTL 1
@
@@ 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.10
@
@@ IN A 10.51.0.10
@* IN A 10.51.0.10
@org in A 10.51.0.10
@*.org IN A 10.51.0.10
for ip in config.accueil_route.keys():
if 'hosts' in config.accueil_route[ip].keys():
for host in config.accueil_route[ip]['hosts']:
print "%s IN A %s" % (host,ip)