Last active
September 20, 2019 03:45
-
-
Save PhirePhly/3afff4838f4a8e31ed039d00737efb17 to your computer and use it in GitHub Desktop.
Conf files for BIND catalog files example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import dns.name | |
import hashlib | |
import sys | |
print (hashlib.sha1(dns.name.from_text(sys.argv[1]).to_wire()).hexdigest()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
catalog.ns1.lan.thelifeofkenneth.com. IN SOA . . 14 2d 15m 1000h 5m | |
catalog.ns1.lan.thelifeofkenneth.com. IN NS ns1.lan.thelifeofkenneth.com. | |
version IN TXT "1" | |
ddb8c2c4b7c59a9a3344cc034ccb8637f89ff997.zones IN PTR zone1.example.com. | |
12b1bb2a76ba242857318440f4fc9f7d35e9c4ed.zones IN PTR zone2.example.com. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zone "catalog.ns1.lan.thelifeofkenneth.com" { | |
type master; | |
file "/etc/bind/catalog.db"; | |
allow-transfer { any; }; | |
also-notify {10.44.1.234; }; | |
}; | |
zone "zone1.example.com" { | |
type master; | |
file "/etc/bind/zone1.example.com.db"; | |
allow-transfer { any; }; | |
also-notify {10.44.1.234; }; | |
}; | |
zone "zone2.example.com" { | |
type master; | |
file "/etc/bind/zone2.example.com.db"; | |
allow-transfer { any; }; | |
also-notify {10.44.1.234; }; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options { | |
directory "/var/cache/bind"; | |
dnssec-validation auto; | |
auth-nxdomain no; # conform to RFC1035 | |
listen-on-v6 { any; }; | |
recursion no; | |
}; | |
logging { | |
channel zone_transfers_log { | |
file "/var/cache/bind/zone_transfers" versions 3 size 20m; | |
print-time yes; | |
print-category yes; | |
print-severity yes; | |
severity info; | |
}; | |
category notify { zone_transfers_log; }; | |
category xfer-in { zone_transfers_log; }; | |
category xfer-out { zone_transfers_log; }; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zone1.example.com. 3600 IN SOA . . 4 2d 15m 1000h 5m | |
zone1.example.com. IN NS ns1.lan.thelifeofkenneth.com. | |
zone1.example.com. IN NS ns2.lan.thelifeofkenneth.com. | |
test IN TXT "hello world" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zone2.example.com. 3600 IN SOA . . 4 2d 15m 1000h 5m | |
zone2.example.com. IN NS ns1.lan.thelifeofkenneth.com. | |
zone2.example.com. IN NS ns2.lan.thelifeofkenneth.com. | |
test IN TXT "hello world2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kenneth@ns2:~$ ls /var/cache/bind/ | |
catalog.db | |
__catz___default_catalog.ns1.lan.thelifeofkenneth.com_zone1.example.com.db | |
__catz___default_catalog.ns1.lan.thelifeofkenneth.com_zone2.example.com.db | |
managed-keys.bind | |
managed-keys.bind.jnl | |
zone_transfers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the only zone explicitly configured for ns2, and that's what makes this amazing! | |
zone "catalog.ns1.lan.thelifeofkenneth.com" { | |
type slave; | |
file "catalog.db"; | |
masters { 10.44.1.228; }; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options { | |
directory "/var/cache/bind"; | |
dnssec-validation auto; | |
auth-nxdomain no; # conform to RFC1035 | |
listen-on-v6 { any; }; | |
recursion no; | |
catalog-zones { | |
zone "catalog.ns1.lan.thelifeofkenneth.com" default-masters { 10.44.1.228; }; | |
}; | |
}; | |
logging { | |
channel zone_transfers_log { | |
file "/var/cache/bind/zone_transfers" versions 3 size 20m; | |
print-time yes; | |
print-category yes; | |
print-severity yes; | |
severity info; | |
}; | |
category notify { zone_transfers_log; }; | |
category xfer-in { zone_transfers_log; }; | |
category xfer-out { zone_transfers_log; }; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment