Table of Contents

NAME

updsoa.pl - update DNS SOA record

SYNOPSIS

updsoa.pl [options] soa_file ...

DESCRIPTION

This script updates the serial number in soa_file. The serial number is formatted as yyyymmddnn where nn differentiates between multiple updates on the same day. For zones with serious flux, the -u uses UTC as the serial number.

The previous version of soa_file is left in soa_file.old

If soa_file does not exist, we create it. Various options are used to control the content of the SOA record, and we also look for .${Myname}rc.pl to read default values from.

Options:
-n ns
Identifies ns as the master for the zone.
-l nslist
If the file nslist exists, it will be $INCLUDEd.
-M email
The email address of the owner of the zone.
-f refresh
The refresh interval in seconds.
-r retry
The retry interval in seconds.
-e expire
The expire timeout (seconds).
-m minTTL
The minimum (default) ttl for the zone records.
-u
Use current time in seconds as serial number.
-T TTL
As of BIND-8.2.2 a $TTL directive is needed to set the default TTL for a zone. The minimum field of the SOA record officially being used for negative caching purposes. Do not set this if using earlier versions of BIND.

To cater for magic domains (eg. round-robin zones) we check for each of the SOA fields in the associative arrays SOA_field. Thus .${Myname}rc.pl might contain $SOA_m{rr.crufty.net} = 0 to set the mimimum TTL to 0.

The command line options set the default values for the SOA fields.

BUGS

BIND-8.2.2 requires the $TTL record appear before any other including the SOA record, otherwise it issues a warning about using the SOA minimum TTL field instead.

AUTHOR

Simon J. Gerraty <sjg@crufty.net>


Table of Contents