crans_bcfg2/Python/etc/bind/db.fake
Valentin Samir 0e762fcbde [bind] On génère db.fake sans mentir sur les ip autorisées
Ignore-this: 775c2b6fb0004ac5a91eae977bdc387f

darcs-hash:20130207235911-3a55a-a27bff377befd7c7839f659e286d0686e885724d.gz
2013-02-08 00:59:11 +01:00

32 lines
679 B
Python

# -*- mode: python; encoding: utf-8 -*-
info["owner"] = "root"
info["group"] = "bind"
info["perms"] = 0644
import config
comment_start = ";"
header("Zone du dns meuteur 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)