2 ============================================================
4 Validation tool for tinydns-data zone files.
9 valtz [-qrRi] <zonefiles>
12 valtz -f[qrRiItT] <zonefiles>
15 valtz -F[qrRiItT] <filterfiles>
18 valtz [-hfFqrRiItT] <file(s)>
23 -f filter (don't just validate) file and output accepted lines to STDOUT.
26 -F treat files as filter configuration files for more advanced filtering.
27 These filterfiles one or several of the following filter directives:
29 zonefile <zonefilepath>
30 zonefile file:<path to textfile including zonefilepaths>
31 Defines the file(s) to be filtered. Can be a globbed value, like
35 Defines an extra logfile that the STDERR output will be copied for
36 this specific filterfile. Useful if you have a lot of filterfiles
37 and want to separate the logs.
40 deny file:<path to <zonepatternfile>
41 Defines a zonepattern to explicitly DENY after implicitly allowing all.
42 (cannot be combined with allow)
45 allow file:<path to <zonepatternfile>
46 Defines a zonepattern to explicitly ALLOW after implicitly denying all.
48 allowtype <recordtype character(s)>
49 Explicitly sets the allowed recordtypes. Note that even comments
50 has to be allowed (but these will not result in errors unless -t)
51 to be copied to the output.
53 Multiple zonefile, allow- and deny-lines are allowed, but also the
54 alternative file:-line that points to a textfile containing one
58 -r allows fqdn to be empty thus denoting the root.
59 This is also allowed per default when doing implict allow - see deny,
60 or when specifying 'allow .', i.e. explictly allowing root as such.
61 (cannot be combined with deny)
64 -R relaxes the validation and allows empty mname and p-fields.xi
65 This is probably not very useful.
68 -i allows the ip-fields to be empty as well. These will then not generate any
72 -I Include rejected lines as comments in output (valid when filtering).
75 -q Do not echo valid lines to STDOUT.
77 -s DO NOT ignore files ending with ,v ~ .bak .log .old .swp .tmp
78 which is done per default.
81 -t Give error even on #comment-lines when they are not allowed.
82 (These errors are silently ignored per default)
86 A commandline way to explicitly set the allowed recordtypes.
87 This is _concatenated_ to the allowtype-allowed recordtypes.
91 All errors in the zonefiles are sent to STDERR.
96 Example; simple filter-use;
97 valtz -f /etc/zones/zone-*
98 >/etc/tinydns/data.filtered
99 2>/var/log/tinydns/valtz.log
101 Example; filterfile use;
102 valtz -F /etc/zones/filter/zones-otto
103 >/etc/tinydns/data.otto
104 2>/var/log/tinydns/valtz.log
107 Example filterfile for using as import from primary (as above):
108 zonefile /var/zones/external/otto/zone-*
111 extralog /var/log/tinydns/external-otto.log
113 Example #2, strict filter for a certain user editing just A-records
115 zonefile /home/felix/zones/zone-fl3x-net
118 extralog /var/log/tinydns/fl3x-net.log
120 Example #3, export filter to secondary
122 zonefile /var/zones/primary/zone-*
123 # just allow OUR zones to be exported, not to annoy secondary partner
124 allow file:/var/zones/primary-zones.txt
125 # don't allow any other types than this; e.g. comments won't be exported
127 extralog /var/log/tinydns/primary-export.log
129 Example #4, /etc/zones/minimalistic-filterfile
131 deny file:/etc/zones/primary-zones.txt
134 and on the commandline;
136 ssh remote.example.org cat /etc/export-zones.txt | \
137 valtz -F /etc/zones/minimalistic-filterfile \
138 >/etc/tinydns/remote.example.org-data \
139 2>/var/log/remote.example.org-zones.log
142 Please mail comments and errors and general feedback to <michael@orlitzky.com>.