.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Net::DNS::SEC::Tools::Donuts 3" .TH Net::DNS::SEC::Tools::Donuts 3 2023-07-29 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME .Vb 1 \& Net::DNS::SEC::Tools::Donuts \- Execute DNS and DNSSEC lint\-like tests on zone data .Ve .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 7 \& # load a zone, rules and analyze everything \& # by default, this will print errors in \*(Aqwrapped text\*(Aq format \& # to stdout. \& my $donuts = new Net::DNS::SEC::Tools::Donuts(); \& $donuts\->load_zone("/path/to/example.com.signed", "example.com"); \& $donuts\->load_rule_files("/path/to/installed/rules/*.txt"); \& my ($rulecount, $errorcount) = $donuts\->analyze(); \& \& # send the output in json format to /tmp/foo.json instead \& $donuts\->set_output_format(\*(Aqjson\*(Aq); \& $donuts\->set_output_location(\*(Aqfile:/tmp/foo.json\*(Aq); \& $donuts\->analyze(); \& \& # display the available features \& print "features: ", join(", ", $donuts\->available_features()), "\en"; \& \& # enable the \*(Aqlive\*(Aq and \*(Aqcheck_data\*(Aq features in the rule sets \& $donuts\->set_feature_list(\*(Aqlive\*(Aq, \*(Aqcheck_data); \& \& # ignore some rules (regexp\*(Aqs to match against rule names) \& $donuts\->set_ignore_list(\*(AqNSEC\*(Aq); \& \& # retrieve the rules loaded into the zone \& my @rules = $donuts\->rules(); \& \& # retrieve the records from the loaded zone \& # (these will be Net::DNS::RR based records) \& my @records = $donuts\->zone_records(); \& \& # or just of a certain name: \& # (these will be a hash reference like { type => [records] }) \& my $records = $donuts\->find_records_by_name(\*(Aqwww.example.com\*(Aq); \& \& # or of just a type for a name: \& # (these will be an array reference to the [records]) \& my $records = \& $donuts\->find_records_by_name_and_type(\*(Aqwww.example.com\*(Aq, \*(AqA\*(Aq); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The \fINet::DNS::SEC::Tools::Donuts\fR (aka \fIDonuts\fR) module is capable of loading a zone file, rules to test against it and then analyzing the rules and reporting the results. .SS "Creating a Donuts instance" .IX Subsection "Creating a Donuts instance" Creating an instance of a Donuts object is straightforward: .PP .Vb 2 \& use Net::DNS::SEC::Tools::Donuts \& my $donuts = new Net::DNS::SEC::Tools::Donuts(); .Ve .SS "Loading and Accessing Zone Data" .IX Subsection "Loading and Accessing Zone Data" \fIload_zone(SPECIFIER, ZONENAME)\fR .IX Subsection "load_zone(SPECIFIER, ZONENAME)" .PP Zone data can be loaded into the Donuts module using the \&\fR\f(BIload_zone()\fR\fI\fR function. This function takes a file path as an argument by default, or one of the special specifiers listed below as well. .ie n .IP "$donuts\->load_zone(""/path/to/file"", ""example.com"");" 4 .el .IP "\f(CW$donuts\fR\->load_zone(""/path/to/file"", ""example.com"");" 4 .IX Item "$donuts->load_zone(""/path/to/file"", ""example.com"");" Loads a file from a typicla (text based) zone data file. It uses the \&\fINet::DNS::Zonefile::Fast\fR module for parsing the zone file into \&\fINet::DNS::RR\fR records. .ie n .IP "$donuts\->load_zone(""axfr:example.com"", ""example.com"");" 4 .el .IP "\f(CW$donuts\fR\->load_zone(""axfr:example.com"", ""example.com"");" 4 .IX Item "$donuts->load_zone(""axfr:example.com"", ""example.com"");" If the host has the ability to perform an \fIaxfr\fR transfer of a given zone, this specifier can be used to dynamically transfer the zone data from the online servers. .ie n .IP "$donuts\->load_zone(""live:www,ftp:aaaa,ns"", ""example.com"");" 4 .el .IP "\f(CW$donuts\fR\->load_zone(""live:www,ftp:aaaa,ns"", ""example.com"");" 4 .IX Item "$donuts->load_zone(""live:www,ftp:aaaa,ns"", ""example.com"");" When the \fIlive:\fR specifier prefix is used, the Donuts module will attempt to perform single queries from the zone for the specified list of domain name prefixes for the zone. The default list (i.e. just "live:") of zone records to query for is just "www". Query types may be specified by separating the label with a ':' character, as in the example above which indicates a AAAA record should be queried for the \&'ftp' host. .Sp In addition to the list specified within teh specifier itself, each zone is always queried for the following entries as well: .RS 4 .IP "\- ZONENAME:DNSKEY" 4 .IX Item "- ZONENAME:DNSKEY" .PD 0 .IP "\- ZONENAME:SOA" 4 .IX Item "- ZONENAME:SOA" .IP "\- ZONENAME:NS" 4 .IX Item "- ZONENAME:NS" .RE .RS 4 .PD .Sp Note that because the zone won't be entirely complete, careful selection or exclusion of rules (see "Ignoring and Only Executing Rules") will likely be required to filter out bad results during any analysis that is performed. .RE .SS "Loading Donuts Rules" .IX Subsection "Loading Donuts Rules" .SS "Analyzing Zones Using Rules" .IX Subsection "Analyzing Zones Using Rules" .SS Features .IX Subsection "Features" .SS "Ignoring and Only Executing Rules" .IX Subsection "Ignoring and Only Executing Rules" .SS Configuration .IX Subsection "Configuration" .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2013\-2013 Parsons. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details. .SH AUTHOR .IX Header "AUTHOR" Wes Hardaker .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBdonuts\|(8)\fR .PP \&\fBNet::DNS\fR, \fBNet::DNS::RR\fR, \fBNet::DNS::SEC::Tools::Donuts::Rule\fR .PP http://www.dnssec\-tools.org/ .SH "POD ERRORS" .IX Header "POD ERRORS" Hey! \fBThe above document had some coding errors, which are explained below:\fR .IP "Around line 972:" 4 .IX Item "Around line 972:" =back without =over