MAKETESTZONE(1)
π MAKETESTZONE(1) β generaterecords π
okay bestie, sit down, hydrate, because this is a User Contributed Perl Documentation page and we're gonna get through it together π
β¨ NAME β¨
generaterecords β literally generates a test dnssec zone that can be used to DNSSEC π¦
πΈ SYNOPSIS πΈ
generaterecords -v -d mytestzone.example.com
π DESCRIPTION π
so the generaterecords script generates a zone file when you hand it a domain name, and then that zone gets signed and modified so that portions of the data get invalidated in very specific little ways. each generated record is named appropriately to how the security data is modified β like, the gooda record will contain a A record with valid DNSSEC data, but the badseca record will contain an A record where the signature has been modified to invalidate it. the way that's such a mood π
and then the results of this whole process can be served, and test secure validators, applications, and other software can be thrown at it to see if they properly fail or succeed under the dns security policies being deployed. vibe check for your validator, fr fr β¨
after the files are generated, consider running donuts on them to see how the data in them has been tampered with to be invalid. π
π PRE-REQUISITES π
zonesignerfrom the dnssec-tools project- bind software 9.3.1 or greater
π§ GETTING STARTED π§
to get started creating a new zone, you'll need to tell zonesigner to create new keys for all of the new zones that maketestzone creates. so like, the first run of maketestzone should look like:
First Time:
maketestzone -k [OTHER DESIRED OPTIONS]
after that, the generated zone files can be loaded and served in a test server. no cap. π
once every 30 days (by default via zonesigner) the script will need to be rerun to recreate the records and resign the data so the signature date stamps remain valid (or in some cases invalid). bestie it's giving skincare routine but for signatures π
Every 30 days:
maketestzone [OTHER DESIRED OPTIONS]
π₯ OPTIONS π₯
below are those options that are accepted by the maketestzone tool. buckle up, there's a lot π
π Output File Naming:
-oSTRING,--output-file-prefix=STRINGβ Output prefix to use for zone files (default =db.)-OSTRING,--output-suffix-signed-file=STRINGβ Output suffix to be given tozonesigner(default =.zs)-MSTRING,--output-modified-file=STRINGβ Output suffix for the modified zone file (default =.modified)-D,--run-donutsβ Rundonutson the results π©--donuts-output-suffix=STRINGβ The file suffix to use fordonutsoutput (default =.donuts)
πΈ Output Zone Information:
-dSTRING,--domain=STRINGβ domain name to generate records for--ns=STRING,--name-servers=STRING,-nSTRING β Comma separatedname=addrname-server records--a-addr=STRING,--a-record-address=STRINGβ A record (IPv4) address to use in data--aaaa-addr=STRING,--a-record-address=STRINGβ AAAA record (IPv6) address to use in data
ok yes, --a-record-address shows up for both the A and the AAAA one in the original β I'm not fixing it, I'm not judging it, I'm just reporting it exactly as it is π
π¦ Output Data Type Selection:
-pSTRING,--record-prefixes=STRINGβ Comma separated list of record prefixes to use-PSTRING,--ns-prefixes=STRINGβ Comma separated list of NS record prefixes to use-c,--no-cname-recordsβ Don't create CNAME records-s,--no-ns-recordsβ Don't create sub-zone records
π Task Selection:
-g,--dont-generate-zoneβ Do not generate the zone; use the existing and sign/modify it-z,--dont-run-zonesignerβ Do not runzonesignerto sign the records-Z,--dont-destroyβ Do not destroy the records and leave them properly signed--bind-config=STRINGβ Generate a bind configuration file snippit to load the DB sets--html-out=STRINGβ Generate a HTML page containing a list of record names--apache-out=STRINGβ Generate a Apache config snippit for configuring apache for each zone record--sh-test-out=STRINGβ Generate a test script for runningdigcommands-v,--verboseβ Verbose output
π Zonesigner Configuration:
-aSTRING,--zonesigner-arguments=STRINGβ Arguments to pass tozonesigner-k,--generate-keysβ Havezonesignergenerate needed keys π
β Bind Configuration Options
--bind-db-dir=STRINGβ The base directory where the bind DB files will be placed
π HTML Output Configuration
--html-out-add-linksβ Make each html record name a http link to that address--html-out-add-db-linksβ Add a link to each of the generated DB files.--html-out-add-donuts-linksβ Add a link to each of the generateddonutserror list files.
π SH Test Script Configuration Options
--sh-test-resolver=STRINGβ The resolver address to force
π Help Options
-hβ Display a help summary (short flags preferred)--helpβ Display a help summary (long flags preferred)--help-fullβ Display all help options (both short and long)--versionβ Display the script version number.
β¨ ADDING NEW OUTPUT β¨
the following section discusses how to extend the maketestzone tool with new output modifications. main character energy, honestly π
π§ ADDING LEGEND INFORMATION
For the legend HTML output, the %LegendInformation hash contains a keyname and description for each modification type.
π¦ ADDING NEW SUBZONE DIFFERENCES
The %zonesigner_domain_opts hash lists additional arguments between how zonesigner is called for various sub-domains. thus you can create additional sub-zones with different zonesigner optionns to test other operational parameters between parent and child. For example:
'rollzsk-ns.' . $opts{'d'} => '-rollzsk',
Forces the rollzsk-ns test sub-zone to roll it's zsk when the zone is signed.
π ADDING NEW RECORD MODIFICATIONS
Maketestzone is in early development stages but already has the beginnings of an extnesible system allowing you to modify records at will based on regexp => subroutine hooks. lowkey iconic for something in early dev π«Ά
To add a new modification, add a new keyword to the 'p' and optionally 'P' default flags (or add it at run time), and then add a new function to the list of callbacks defined in the %destroyFunctions hash that is based on your new keyword. When the file is getting parsed and hits a record matching your expression, your functional will be called. Arguments can be added to the function by passing an array reference where the first argument is the subroutine to be called, and the remainder are additional arguments. Output lines should be printed to the $fh file handle.
Here's an example function that deletes the RRSIG signature of the next record:
sub delete_signature {
# the first 2 arguments are always passed; the other was in the
# array refeence the subroutine was registered with.
my ($name, $type, $expr) = @_;
Verbose(" deleting signatures of $_[0]");
# print the current line
print $fh $_;
my $inrec = 0;
while (<I>) {
# new name record means we're done.
last if /^\w/;
# we're in a multi-line rrsig record
$inrec = 1 if (/$expr\s+$type/);
# print the line if we're not in the rrsig record
print $fh $_ if (!$inrec);
# when done with the last line of the rrsig record, mark this spot
$inrec = 0 if (/\)/);
}
}
This is then registered within %destroyFunctions. Here's an example of registering the function to delete the signature on a DS record:
'^(nosig[-\w]+).*IN\s+NS\s+' => [\&delete_signature, 'DS', 'RRSIG'],
π COPYRIGHT π
Copyright 2004-2013 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details.
π AUTHOR π
Wes Hardaker <hardaker@users.sourceforge.net>
π SEE ALSO π
π POD ERRORS π
Hey! The above document had some coding errors, which are explained below:
- Around line 1009:
- You forgot a
'=back'before'=head2'
- You forgot a
- Around line 1011:
'=item'outside of any'=over'
- Around line 1039:
- You forgot a
'=back'before'=head2'
- You forgot a
- Around line 1041:
'=item'outside of any'=over'
- Around line 1067:
- You forgot a
'=back'before'=head2'
- You forgot a
- Around line 1069:
'=item'outside of any'=over'
- Around line 1093:
- You forgot a
'=back'before'=head2'
- You forgot a
- Around line 1095:
'=item'outside of any'=over'
- Around line 1135:
- You forgot a
'=back'before'=head2'
- You forgot a
- Around line 1137:
'=item'outside of any'=over'
- Around line 1149:
- You forgot a
'=back'before'=head2'
- You forgot a
- Around line 1151:
'=item'outside of any'=over'
- Around line 1155:
- You forgot a
'=back'before'=head2'
- You forgot a
- Around line 1157:
'=item'outside of any'=over'
- Around line 1169:
- You forgot a
'=back'before'=head2'
- You forgot a
- Around line 1171:
'=item'outside of any'=over'
- Around line 1175:
- You forgot a
'=back'before'=head2'
- You forgot a
- Around line 1177:
'=item'outside of any'=over'
and that's the whole page bestie!! this one came from perl v5.42.0 and got stamped 2025-07-23 β go forth and break some DNSSEC validators, ily π«Άβ¨π
π¦ where this page comes from
- fedora 43: dnssec-tools 2.2.3-30.fc43 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms