|
1 Manage DNS/bind9 zonefiles. |
|
2 |
|
3 update: |
|
4 ./bin/update reads data from settings/, and generates zonefiles under zones/. |
|
5 |
|
6 `update` also shows and commits changes in settings/ data. |
|
7 |
|
8 bin/update-serial: |
|
9 Increment DNS SOA record serials in the given .serial files. |
|
10 |
|
11 Uses a YYYYMMDDXX format, but supports XX overflow. |
|
12 |
|
13 bin/process-zone: |
|
14 Read zonefile containing records, and generate any of: |
|
15 |
|
16 --check-hosts: |
|
17 Check for duplicate host names/IPs. |
|
18 |
|
19 --forward-zone: |
|
20 Generate additional TXT/MX records to supplement A/CNAME records. |
|
21 |
|
22 --reverse-zone=NET |
|
23 Generate PTR records for all matching A records. |
|
24 |
|
25 --meta-zone: |
|
26 Generate additional TXT records from zonefile metadata, read from: |
|
27 |
|
28 hg annotate -q --date | ./bin/process-zone --input-line-date ... |
|
29 |
|
30 bin/expand-zone: |
|
31 Expand template vars in a zone textfile; does not parse records, just passes through lines. |
|
32 |
|
33 Used to substitute e.g. `--serial .../foo.serial` values into SOA '{serial}' fields. |
|
34 |
|
35 bin/update: |
|
36 Runs update-serial/process-zone/expand-zone to keep various generated zones/views up-to-date with respect to |
|
37 source files under settings/ |
|
38 |
|
39 Also supports hg diff/commit/annotate integration with settings. |
|
40 |
|
41 settings/: |
|
42 Input files, fed through update to generate files under zones/ |
|
43 |
|
44 *.serial: |
|
45 Zone serial numbers for corresponding *.zone |
|
46 |
|
47 *.zone: |
|
48 Zone header, passed through process-zone with `--serial *.serial` and any appropriate `--expand view=...`. |
|
49 |
|
50 May include a view-based $INCLUDE to include different zone data for different views. |
|
51 |
|
52 *.zone.*: |
|
53 Additional common zone data; copied to zones/, and $INCLUDE'd from *.zone. |
|
54 |
|
55 *.txt: |
|
56 Hosts zone data, used to generate forwards/reverse -hosts zones |
|
57 |
|
58 zones/: |
|
59 Output files, loaded by bind. |
|
60 |
|
61 *.zone: |
|
62 View-independent zone headers with expanded serial. |
|
63 |
|
64 *.zone.hosts: |
|
65 View-independent generated zones for hosts. |
|
66 |
|
67 *.zone.$view: |
|
68 Per-view copied zone data. |
|
69 |
|
70 *.zone.*: |
|
71 Additional view-independent copied zone data. |
|
72 |
|
73 $view/*.zone: |
|
74 Per-view zone header with expanded $INCLUDE:s and serial. |
|
75 |
|
76 $view/*.zone.hosts: |
|
77 Per-view generated zones for hosts. |
|
78 |
|
79 $view/*.zone -> .../$.zone: |
|
80 Symlinked generic-zone data for some specific zone; either view-specific or view-independent. |
|
81 |