Generation of BIND and dhcpd configurations files is done using command-line utility sauron. Configuration files can be generated at the server where Sauron and PostgreSQL are installed, or Sauron software can be installed also in the actual DNS & DHCP server and configured to connect to PostgreSQL database over network (if connecting PostgreSQL over the network SSL connection should be used).
To generate complete BIND configuration file set as well as dhcpd configuration file, following command could be used:
./sauron --bind --dhcp --updateserial ns1 /opt/ns/ |
Sauron should always generate valid configuration files for BIND and dhcpd, but to be sure and automatically validate generated files, there is --check option that causes sauron command to check generated files. For this to work you need to set specify the locations of dhcpd, named-checkconf, and named-checkzone programs in Sauron configuration file. Here's an example for enabling --check option to work in a RedHat Linux:
# set to enable dhcpd.conf validation from sauron $SAURON_DHCP_CHK_PROG = '/usr/sbin/dhcpd'; $SAURON_DHCP_CHK_ARGS = '-q -t -cf'; # set to enable named.conf validation from sauron $SAURON_NAMED_CHK_PROG = '/usr/sbin/named-checkconf'; $SAURON_NAMED_CHK_ARGS = ''; # set to enable zone file validation from sauron $SAURON_ZONE_CHK_PROG = '/usr/sbin/named-checkzone'; $SAURON_ZONE_CHK_ARGS = '-q'; |
# mailer configuration (set to enable email notifications) $SAURON_MAILER = '/usr/sbin/sendmail'; $SAURON_MAILER_ARGS = '-t'; $SAURON_MAIL_FROM = 'postmaster@middle.earth'; |
You can automate BIND & dhcpd configuration files generation using for example a simple shell script that is run periodically from cron. But you should use --check option when doing this to make sure you always end up with valid configuration files.