4.6. ToolsWouldn't it be handy to have a tool to translate your host table into master file format? There is such a beast, written in Perl: h2n, a host table-to-master file converter. You can use h2n to create your zone data files the first time and then maintain your data manually. Or you can use h2n over and over again. As you've seen, the host table's format is much simpler to understand and modify correctly than master file format. So, you could maintain /etc/hosts and rerun h2n to update your zone data files after each modification.If you plan to use h2n, you might as well start with it, since it uses /etc/hosts -- not your hand-crafted zone data -- to generate the new zone data files. We could have saved ourselves a lot of work by generating the sample zone data files in this chapter with the following:
(To generate a BIND 8 or 9 configuration file, add -v 8 to the option list.)% h2n -d movie.edu -s terminator -s robocop \ -n 192.249.249 -n 192.253.253 \ -u al.robocop.movie.edu The -d and -n options specify the domain name of your forward-mapping zone and your network numbers. You'll notice that the names of the zone data files are derived from these options. The -s options list the authoritative name servers for the zones to use in the NS records. The -u (user) is the email address in the SOA record. We cover h2n in more detail in Chapter 7, "Maintaining BIND", after we've covered how DNS affects email.
|
|