4.17. dnssec-signzone --- DNSSEC zone signer

4.17.1. Synopsis

dnssec-signzone [-a] [-c class] [-d directory] [-D] [-E <engine-name>] [-e end-time] [-f output-file] [-g] [-h] [-i interval] [-j jitter] [-K directory] [-k key] [-L serial] [-M max-ttl] [-N soa-serial-format] [-n <num-threads>] [-o origin] [-O output-style] [-P] [-R] [-S] [-s start-time] [-T ttl] [-t] [-u] [-v level] [-V] [-X <extended-end-time>] [-x] [-z] [-3 salt] [-H iterations] [-A] <zonefile> [key...]

4.17.2. Description

dnssec-signzone signs a zone. It generates NSEC and RRSIG records and produces a signed version of the zone. The security status of delegations from the signed zone (that is, whether the child zones are secure or not) is determined by the presence or absence of a keyset file for each child zone.

4.17.3. Options

-a

Verify all generated signatures.

-c <class>

Specifies the DNS class of the zone.

-C

Compatibility mode: Generate a keyset-zonename file in addition to dsset-zonename when signing a zone, for use by older versions of dnssec-signzone.

-d <directory>

Look for dsset- or keyset- files in <directory>.

-D

Output only those record types automatically managed by dnssec-signzone, i.e. RRSIG, NSEC, NSEC3 and NSEC3PARAM records. If smart signing (-S) is used, DNSKEY records are also included. The resulting file can be included in the original zone file with the $INCLUDE master file directive. This option cannot be combined with serial number updating.

-E <engine-name>

Specifies the OpenSSL engine to use for cryptographic operations, such as a secure key store used for signing.

-g

Generate DS records for child zones from dsset- or keyset- file. Existing DS records will be removed.

-K <directory>

Key repository: Specify a directory to search for DNSSEC keys. If not specified, defaults to the current directory.

-k <key>

Treat specified <key> as a key signing key (KSK) ignoring any key flags. This option may be specified multiple times.

-M <max-ttl>

Sets the maximum TTL for the signed zone. Any TTL higher than maxttl in the input zone will be reduced to maxttl in the output. This provides certainty as to the largest possible TTL in the signed zone, which is useful to know when rolling keys because it is the longest possible time before signatures that have been retrieved by resolvers will expire from resolver caches. Zones that are signed with this option should be configured to use a matching max-zone-ttl config option in named.conf(5).

Note

This option is incompatible with -D, because it modifies non-DNSSEC data in the output zone.

-s <start-time>

Specify the date and time when the generated RRSIG records become valid. This can be either an absolute or relative time. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000. A relative start time is indicated by +N, which is N seconds from the current time. If -s option is not specified, the current time minus 1 hour (to allow for clock skew) is used.

-e <end-time>

Specify the date and time when the generated RRSIG records expire. As with -s, an absolute time is indicated in YYYYMMDDHHMMSS notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time relative to the current time is indicated with now+N. If -e option is not specified, 30 days from the start time is used as a default. <end-time> must be later than <start-time> (either specified with -s or its default value).

-X <extended-end-time>

Specify the date and time when the generated RRSIG records for the DNSKEY RRset will expire. This is to be used in cases when the DNSKEY signatures need to persist longer than signatures on other records; e.g., when the private component of the KSK is kept offline and the KSK signature is to be refreshed manually.

As with -s, an absolute time is indicated in YYYYMMDDHHMMSS notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time relative to the current time is indicated with now+N. If -X is not specified, the value of <end-time> (either specified with -e or its default value) is used as the default. <extended-end-time> must be later than <start-time> (either specified with -s or its default value).

-f <output-file>

The name of the output file containing the signed zone. The default is to append .signed to the input filename. If <output-file> is set to -, then the signed zone is written to standard-output, with a default output format of full.

-i <interval>

When a previously-signed zone is passed as input, records may be resigned. The <interval> value specifies the cycle interval as an offset from the current time (in seconds). If an RRSIG record expires after the cycle interval, it is retained. Otherwise, it is considered to be expiring soon, and it will be replaced.

The default cycle interval is one quarter of the difference between the signature end and start times. So if neither -e or -s are specified, dnssec-signzone generates signatures that are valid for 30 days, with a cycle interval of 7.5 days. Therefore, if any existing RRSIG records are due to expire in less than 7.5 days, they would be replaced.

-j <jitter>

When signing a zone with a fixed signature lifetime, all RRSIG records issued at the time of signing expire simultaneously. If the zone is incrementally signed, i.e. a previously-signed zone is passed as input to the signer, all expired signatures have to be regenerated at about the same time. The <jitter> value specifies a jitter window that will be used to randomize the signature expire time, thus spreading incremental signature regeneration over time.

Signature lifetime jitter, also to some extent, benefits validators and servers by spreading out cache expiration, i.e. if large numbers of RRSIGs don't expire at the same time from all caches there will be less congestion than if all validators need to refetch at mostly the same time.

-L <serial>

When writing a signed zone, set the "source serial" value in the header to the specified <serial> number. (This is expected to be used primarily for testing purposes.)

-n <num-threads>

Specifies the number of threads to use. By default, one thread is started for each detected processor.

-N <soa-serial-format>

The SOA serial number format of the signed zone. Possible formats are keep, increment, and unixtime.

  • keep --- Do not modify the SOA serial number

  • increment --- Increment the SOA serial number using RFC 1982 arithmetic

  • unixtime --- Set the SOA serial number to the number of seconds since epoch

The default is keep.

-o <origin>

The zone origin. If not specified, the name of the zone file is assumed to be the origin.

-O <output-style>

The style of the output file containing the signed zone. Possible formats are text and full.

  • text --- the standard textual representation of the zone

  • full --- text output in a format suitable for processing by external scripts

The default is text.

-P

Disable post sign verification tests.

The post sign verification test ensures that for each algorithm in use there is at least one non revoked self signed KSK key, that all revoked KSK keys are self signed, and that all records in the zone are signed by the algorithm. This option skips these tests.

-Q

Remove signatures from keys that are no longer active.

Normally, when a previously-signed zone is passed as input to the signer, and a DNSKEY record has been removed and replaced with a new one, signatures from the old key that are still within their validity period are retained. This allows the zone to continue to validate with cached copies of the old DNSKEY RRset. The -Q option forces dnssec-signzone to remove signatures from keys that are no longer active. This enables ZSK rollover using the procedure described in RFC 6781, section 4.1.1.1 (Pre-Publish Zone Signing Key Rollover).

-R

Remove signatures from keys that are no longer published.

This option is similar to -Q, except it forces dnssec-signzone to signatures from keys that are no longer published. This enables ZSK rollover using the procedure described in RFC 6781, section 4.1.1.2 (Double-Signature Zone Signing Key Rollover).

-S

Smart signing. Instructs dnssec-signzone to search the key repository for keys that match the zone being signed, and to include them in the zone if appropriate.

When a key is found, its timing metadata is examined to determine how it should be used, according to the following rules. Each successive rule takes priority over the prior ones:

  1. If no timing metadata has been set for the key, the key is published in the zone and used to sign the zone.

  2. If the key's publication date is set and is in the past, the key is published in the zone.

  3. If the key's activation date is set and in the past, the key is published (regardless of publication date) and used to sign the zone.

  4. If the key's revocation date is set and in the past, and the key is published, then the key is revoked, and the revoked key is used to sign the zone.

  5. If either of the key's unpublication or deletion dates are set and in the past, the key is NOT published or used to sign the zone, regardless of any other metadata.

-T <ttl>

Specifies a TTL to be used for new DNSKEY records imported into the zone from the key repository. If not specified, the default is the TTL value from the zone's SOA record. This option is ignored when signing without -S, since DNSKEY records are not imported from the key repository in that case. It is also ignored if there are any pre-existing DNSKEY records at the zone apex, in which case new records' TTL values will be set to match them, or if any of the imported DNSKEY records had a default TTL value. In the event of a a conflict between TTL values in imported keys, the shortest one is used.

-t

Print statistics at completion.

-u

Update NSEC/NSEC3 chain when re-signing a previously signed zone. With this option, a zone signed with NSEC can be switched to NSEC3, or a zone signed with NSEC3 can be switch to NSEC or to NSEC3 with different parameters. Without this option, dnssec-signzone will retain the existing chain when re-signing.

-x

Only sign the DNSKEY RRset with key-signing keys (KSKs), and omit signatures from zone-signing keys. This is similar to the dnssec-dnskey-kskonly zone config option in named.conf(5).

-z

Ignore KSK flag on key when determining what to sign. This causes KSK-flagged keys to sign all records, not just the DNSKEY RRset. This is similar to the update-check-ksk zone config option in named.conf(5).

-3 <salt>

Generate an NSEC3 chain with the given hex encoded salt. A dash (-) value for <salt> can be used to indicate that no salt is to be used when generating the NSEC3 chain.

-H <iterations>

When generating an NSEC3 chain, use this many iterations. The default is 10.

-A

When generating an NSEC3 chain set the OPTOUT flag on all NSEC3 records and do not generate NSEC3 records for insecure delegations.

Using this option twice (i.e., -AA) turns the OPTOUT flag off for all records. This is useful when using the -u option to modify an NSEC3 chain which previously had OPTOUT set.

Error

TODO: Use a separate option for -AA (-A specified twice) and remove this hack.

-h

Print program usage information and exit.

-v <level>

Set the verbosity level.

-V

Print the program's version and exit.

<zonefile>

The file containing the zone to be signed.

[<key> ...]

Specify which keys should be used to sign the zone. If no keys are specified, then the zone will be examined for DNSKEY records at the zone apex. If these are found and there are matching private keys in the current directory, then these will be used for signing.

4.17.4. Examples

The following command signs the example.com zone with the ECDSAP256SHA256 key generated by dnssec-keygen(1) (Kexample.com.+013+17247). Because the -S option is not being used, the zone's keys must be in the master file (db.example.com). This invocation looks for dsset files, in the current directory, so that DS records can be imported from them (-g).

% dnssec-signzone -g -o example.com db.example.com Kexample.com.+013+17247
db.example.com.signed
%

In the above example, dnssec-signzone creates the file db.example.com.signed. This file should be referenced in a zone statement in a named.conf(5) configuration file.

The following example re-signs a previously signed zone with default parameters. The private keys are assumed to be in the current directory.

% cp db.example.com.signed db.example.com
% dnssec-signzone -o example.com db.example.com
db.example.com.signed
%

4.17.5. See also

dnssec-keygen(1)