Revision 470b93f1c4a81c167145f7551c3c015de74669f2, 3.9 kB (checked in by Paul Querna <>, 6 years ago)

Add support for setting the Port of the remote Nameserver in the DNS check

  • Property mode set to 100644
1 <module>
2   <name>dns</name>
3   <description><para>The dns module leverages libudns to allow highly concurrent DNS lookups of a variety of DNS RR types.  In the event that you name a dns check <parameter></parameter> with an rtype of <parameter>PTR</parameter>, the result of the query may be used throughout reconnoiter as the identifying hostname of that target.</para>
4   <para>This module provides the <function>inaddrarpa</function> interpolation method which will reverse a dot-delimited IP address.  This is particularly useful for constructing queries, but also used for checking blacklists, whitelists and other IP-based DNS databases.</para>
5   </description>
6   <loader>C</loader>
7   <image></image>
8   <moduleconfig />
9   <checkconfig>
10     <parameter name="nameserver"
11                required="optional"
12                default="%[target_ip] or determined from underlying system"
13                allowed=".+">The domain name server to query. If the name of the check is, the system default nameserver is used.  Otherwise, the nameserver is the %[target_ip] of the the check.  If set to the string "default" the underlying system default nameserver is used.</parameter>
14     <parameter name="port"
15                required="optional"
16                default="53"
17                allowed="\d+">The port on which the remote server's DNS service is running.</parameter>
18     <parameter name="ctype"
19                required="optional"
20                default="IN"
21                allowed="(IN|CH|HS)">The DNS class of the query. IN: Internet, CH: Chaos, HS: Hesoid.</parameter>
22     <parameter name="rtype"
23                required="optional"
24                default="A|PTR"
25                allowed="(A|AAAA|TXT|MX|SOA|CNAME|PTR|NS|MB|MD|MF|MG|MR)">The DNS resource record type of the query.  If the name of the check is, the default is PTR, otherwise it is A.</parameter>
26     <parameter name="query"
27                required="required"
28                default="%[name]|%[:inaddrarpa:target_ip]"
29                allowed=".+">The query to send.  If the name of the check is, the reverse IP octet notation of syntax is synthesized by default.  Otherwise the default query is the name of the check itself.</parameter>
30     <parameter name="want_sort"
31                required="optional"
32                default="true"
33                allowed="(true|false|on|off)">Sorts (strcmp) the answers if multiple RRs are returned in the result set.</parameter>
34   </checkconfig>
35   <examples>
36     <example>
37       <title>Establishing PTR records for hosts.</title>
38       <para>The following established names for targets 10.1.2.{3,4,5,6} using the local nameserver ( that provides service for that network.</para>
39       <programlisting><![CDATA[
40       <noit>
41         <modules>
42           <module image="dns" name="dns"/>
43         </modules>
44         <checks>
45           <config>
46             <nameserver></nameserver>
47           </config>
48           <ptr module="dns" name="">
49             <check uuid="2cddb2a8-76ff-11dd-83c8-f75cb8b93bd9" target=""/>
50             <check uuid="2dd79110-76ff-11dd-9b54-739adc274a93" target=""/>
51             <check uuid="5627560a-76ff-11dd-941f-4b75679cb908" target=""/>
52             <check uuid="5fdcb8de-76ff-11dd-ae16-2740afc178ae" target=""/>
53           </ptr>
54         </checks>
55       </noit>
56     ]]></programlisting>
57     </example>
58     <example>
59       <title>Checking</title>
60       <para>The following checks the DNS server residing at for the A record of</para>
61       <programlisting><![CDATA[
62       <noit>
63         <modules>
64           <module image="dns" name="dns"/>
65         </modules>
66         <checks>
67           <ns1 module="dns" target="">
68             <check uuid="3cddb2a8-76ff-11dd-83c8-f75cb8b93bd9" name=""/>
69           </ns1>
70         </checks>
71       </noit>
72     ]]></programlisting>
73     </example>
74   </examples>
75 </module>
Note: See TracBrowser for help on using the browser.