When Micetro is installed on a server running BIND, it needs to perform several changes to the server configuration file structure. This article describes these changes and includes an overview of how the server configuration files are processed after Micetro has updated the structure.
Arranging the configuration and files
When started, the parser detects the following:
- Whether the directory <BWD>/conf/zones exists.
- Whether the initial configuration file (typically
named.conf) contains one of the following phrases:- "// This file was generated by"
- "generated by Micetro"
If both of these criteria are met, the parser assumes that the configuration has been arranged and behaves accordingly.
Additionally, if the configuration does not have a logging statement, the arranger adds a sensible logging statement, making it easier to adjust for different requirements and providing consistent logging across users.
named.conf
named.conf is split into several files. A new
named.conf file that includes statements for all the new files
is created.
When named.conf is split up, a new file is created for each zone
statement.
Zone options files
A new file, <BWD>/conf/zones is created. It contains a list of
includes for zone option files which are stored in the directory
<BWD>/conf/zoneopt/, one for each zone. The zone options (or
definitions) files are called <zonename>.opt.
Zone files
No changes are made to the zone files themselves. The installer copies the zone files to different directories, depending on their types:
-
primary and forward zones are copied to <BWD>/hosts/masters/
-
secondary and stub zones are copied to <BWD>/hosts/slaves/
The new zone file is named <zonename>. If a zone is in a view, it
will use the view name as a prefix, e.g.,
<viewname>-<zonename>.
Configuration files
The configuration files are processed in the following order after the file structure has been updated by Micetro:
File: /etc/named.conf
- include <BWD>/conf/logging
- include <BWD>/conf/user_before
- include <BWD>/conf//options
- include <BWD>/conf/user_after
- include <BWD>/conf/zones
Directory: <BWD>/conf
- File:
logging: Contains the logging statement. - File:
user_before: Contains all ACL and key statement. It may not contain other statements.Note: Micetro does not modify this file, so the user can change it as needed. - File:
options: Contains the options statement. - File:
user_after: Contains the root.hint. zone statement. It can also contain controls, server, and trust keys statements.Note: Micetro does not modify this file, so the user can change it as needed. - File:
zones: Contains include statements for all zones on the server, such asinclude conf/zoneopt/text.com.opt.
Directory: <BWD>/conf/zoneopt
- File:
<zonename.opt>: Contains zone definition and options for <zonename>.
Example:
zone test.com. IN {
type master;
file hosts/masters/test.com;
allow-query { any; };
};
Directory: <BWD>/hosts/masters
- File:
test.com: The actual zone file.
Communicating with BIND
While parsing the configuration, the parser checks whether an inet statement
exists within the control statement. If an inet statement exists, the parser
will use it to communicate with BIND. If it does not exist, however, the parser
checks whether an rndc.conf or rndc.key file
exists in the same directory as the initial configuration file (typically
named.conf).
rndc.conf rather than
rndc.key.In the preferences.cfgfile, you do not need to explicitly define the
location of named-checkconf and named-checkzone.
The agent locates them automatically, given that they exist in a known default
location. If desired, you can override this behavior by defining it in the
preferences.cfg file. For information about specifying a
different path for the named-checkconf and/or
named-checkzone values, refer to Overriding the default named-checkconf or named-checkzone paths.
The following locations are searched in the following order:
- /usr/local/bin
- /usr/bin
- /usr/sbin
- /usr/local/sbin
- /etc/local/sbin
- /etc/opt/isc/isc-bind
- /etc/opt/isc/scls/isc-bind