man.dnssec-cds.html 14.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
 - Copyright (C) 2000-2017 Internet Systems Consortium, Inc. ("ISC")
 - 
 - This Source Code Form is subject to the terms of the Mozilla Public
 - License, v. 2.0. If a copy of the MPL was not distributed with this
 - file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>dnssec-cds</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
<link rel="up" href="Bv9ARM.ch13.html" title="Manual pages">
<link rel="prev" href="man.dig.html" title="dig">
<link rel="next" href="man.dnssec-checkds.html" title="dnssec-checkds">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center"><span class="application">dnssec-cds</span></th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="man.dig.html">Prev</a> </td>
<th width="60%" align="center">Manual pages</th>
<td width="20%" align="right"> <a accesskey="n" href="man.dnssec-checkds.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="refentry">
<a name="man.dnssec-cds"></a><div class="titlepage"></div>
  
  

  

  <div class="refnamediv">
<h2>Name</h2>
<p>
    <span class="application">dnssec-cds</span>
     &#8212; change DS records for a child zone based on CDS/CDNSKEY
  </p>
</div>

  

  <div class="refsynopsisdiv">
<h2>Synopsis</h2>
    <div class="cmdsynopsis"><p>
      <code class="command">dnssec-cds</code> 
       [<code class="option">-a <em class="replaceable"><code>alg</code></em></code>...]
       [<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
       [<code class="option">-D</code>]
       {<code class="option">-d <em class="replaceable"><code>dsset-file</code></em></code>}
       {<code class="option">-f <em class="replaceable"><code>child-file</code></em></code>}
       [<code class="option">-i</code> [<em class="replaceable"><code>extension</code></em>]]
       [<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>]
       [<code class="option">-T <em class="replaceable"><code>ttl</code></em></code>]
       [<code class="option">-u</code>]
       [<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
       [<code class="option">-V</code>]
       {domain}
    </p></div>
  </div>

  <div class="refsection">
<a name="id-1.14.6.7"></a><h2>DESCRIPTION</h2>

    <p>
      The <span class="command"><strong>dnssec-cds</strong></span> command changes DS records at
      a delegation point based on CDS or CDNSKEY records published in
      the child zone. If both CDS and CDNSKEY records are present in
      the child zone, the CDS is preferred.
    </p>
    <p>
      Two input files are required.  The
      <code class="option">-f <em class="replaceable"><code>child-file</code></em></code>
      option specifies a file containing the child's CDS and/or CDNSKEY
      records, plus RRSIG and DNSKEY records so that they can be
      authenticated.  The
      <code class="option">-d <em class="replaceable"><code>path</code></em></code>
      option specifies the location of a file containing the current DS
      records. For example, this could be a <code class="filename">dsset-</code>
      file generated by <span class="command"><strong>dnssec-signzone</strong></span>, or the output of
      <span class="command"><strong>dnssec-dsfromkey</strong></span>, or the output of a previous
      run of <span class="command"><strong>dnssec-cds</strong></span>.
    </p>
    <p>
      For protection against replay attacks, the signatures on the
      child records must not be older than they were on a previous run
      of <span class="command"><strong>dnssec-cds</strong></span>. This time is obtained from the
      modification time of the <code class="filename">dsset-</code> file, or
      from the <code class="option">-s</code> option.
    </p>
    <p>
      To protect against breaking the delegation,
      <span class="command"><strong>dnssec-cds</strong></span> ensures that the DNSKEY RRset can be
      verified by every key algorithm in the new DS RRset, and that the
      same set of keys are covered by every DS digest type.
    </p>
    <p>
      By default, replacement DS records are written to the standard
      output; with the <code class="option">-i</code> option the input file is
      overwritten in place. The replacement DS records will be the
      same as the existing records when no change is required. The
      output can be empty if the CDS / CDNSKEY records specify that
      the child zone wants to go insecure.
    </p>
    <p>
      Warning: Be careful not to delete the DS records
      when <span class="command"><strong>dnssec-cds</strong></span> fails!
    </p>
    <p>
      Alternatively, <span class="command"><strong>dnssec-cds -u</strong></span> writes
      an <span class="command"><strong>nsupdate</strong></span> script to the standard output.
      You can use the <code class="option">-u</code> and <code class="option">-i</code>
      options together to maintain a <code class="filename">dsset-</code> file
      as well as emit an <span class="command"><strong>nsupdate</strong></span> script.
    </p>

  </div>

  <div class="refsection">
<a name="id-1.14.6.8"></a><h2>OPTIONS</h2>

    <div class="variablelist"><dl class="variablelist">
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd>
          <p>
	    Specify a digest algorithm to use when converting CDNSKEY
	    records to DS records. This option can be repeated, so
	    that multiple DS records are created for each CDNSKEY
	    record. This option has no effect when using CDS records.
          </p>
          <p>
	    The <em class="replaceable"><code>algorithm</code></em> must be one of SHA-1
	    (SHA1), SHA-256 (SHA256), GOST, or SHA-384 (SHA384). These
	    values are case insensitive. If no algorithm is specified,
	    the default is SHA-256.
          </p>
        </dd>
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
<dd>
          <p>
            Specifies the DNS class of the zones.
          </p>
        </dd>
<dt><span class="term">-D</span></dt>
<dd>
          <p>
	    Generate DS records from CDNSKEY records if both CDS and
	    CDNSKEY records are present in the child zone. By default
	    CDS records are preferred.
          </p>
        </dd>
<dt><span class="term">-d <em class="replaceable"><code>path</code></em></span></dt>
<dd>
          <p>
            Location of the parent DS records.
	    The <em class="replaceable"><code>path</code></em> can be the name of a file
	    containing the DS records, or if it is a
	    directory, <span class="command"><strong>dnssec-cds</strong></span> looks for
	    a <code class="filename">dsset-</code> file for
	    the <em class="replaceable"><code>domain</code></em> inside the directory.
          </p>
          <p>
            To protect against replay attacks, child records are
            rejected if they were signed earlier than the modification
            time of the <code class="filename">dsset-</code> file. This can be
            adjusted with the <code class="option">-s</code> option.
          </p>
        </dd>
<dt><span class="term">-f <em class="replaceable"><code>child-file</code></em></span></dt>
<dd>
          <p>
	    File containing the child's CDS and/or CDNSKEY records,
	    plus its DNSKEY records and the covering RRSIG records so
	    that they can be authenticated.
          </p>
	  <p>
	    The EXAMPLES below describe how to generate this file.
	  </p>
        </dd>
<dt><span class="term">-i[<em class="replaceable"><code>extension</code></em>]</span></dt>
<dd>
          <p>
            Update the <code class="filename">dsset-</code> file in place,
            instead of writing DS records to the standard output.
          </p>
	  <p>
	    There must be no space between the <code class="option">-i</code> and
	    the <em class="replaceable"><code>extension</code></em>. If you provide
	    no <em class="replaceable"><code>extension</code></em> then the
	    old <code class="filename">dsset-</code> is discarded. If
	    an <em class="replaceable"><code>extension</code></em> is present, a
	    backup of the old <code class="filename">dsset-</code> file is kept
	    with the <em class="replaceable"><code>extension</code></em> appended to
	    its filename.
	  </p>
          <p>
            To protect against replay attacks, the modification time
            of the <code class="filename">dsset-</code> file is set to match
            the signature inception time of the child records,
            provided that is later than the file's current
            modification time.
          </p>
        </dd>
<dt><span class="term">-s <em class="replaceable"><code>start-time</code></em></span></dt>
<dd>
          <p>
            Specify the date and time after which RRSIG records become
            acceptable. This can be either an absolute or relative
            time. An absolute start time is indicated by a number in
            YYYYMMDDHHMMSS notation; 20170827133700 denotes 13:37:00
            UTC on August 27th, 2017. A time relative to
            the <code class="filename">dsset-</code> file is indicated with -N,
            which is N seconds before the file modification time. A
            time relative to the current time is indicated with now+N.
	  </p>
	  <p>
            If no <em class="replaceable"><code>start-time</code></em> is specified, the
            modification time of the <code class="filename">dsset-</code> file
            is used.
          </p>
        </dd>
<dt><span class="term">-T <em class="replaceable"><code>ttl</code></em></span></dt>
<dd>
          <p>
            Specifies a TTL to be used for new DS records. If not
            specified, the default is the TTL of the old DS records.
            If they had no explicit TTL then the new DS records also
            have no explicit TTL.
          </p>
        </dd>
<dt><span class="term">-u</span></dt>
<dd>
          <p>
	    Write an <span class="command"><strong>nsupdate</strong></span> script to the
	    standard output, instead of printing the new DS reords.
	    The output will be empty if no change is needed.
          </p>
	  <p>
	    Note: The TTL of new records needs to be specified, either
	    in the original <code class="filename">dsset-</code> file, or with
	    the <code class="option">-T</code> option, or using
	    the <span class="command"><strong>nsupdate</strong></span> <span class="command"><strong>ttl</strong></span>
	    command.
	  </p>
        </dd>
<dt><span class="term">-V</span></dt>
<dd>
	  <p>
	    Print version information.
	  </p>
        </dd>
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
<dd>
          <p>
            Sets the debugging level. Level 1 is intended to be
            usefully verbose for general users; higher levels are
            intended for developers.
          </p>
        </dd>
<dt><span class="term"><em class="replaceable"><code>domain</code></em></span></dt>
<dd>
          <p>
            The name of the delegation point / child zone apex.
          </p>
        </dd>
</dl></div>
  </div>

  <div class="refsection">
<a name="id-1.14.6.9"></a><h2>EXIT STATUS</h2>

    <p>
      The <span class="command"><strong>dnssec-cds</strong></span> command exits 0 on success, or
      non-zero if an error occurred.
    </p>
    <p>
      In the success case, the DS records might or might not need
      to be changed.
    </p>

  </div>

  <div class="refsection">
<a name="id-1.14.6.10"></a><h2>EXAMPLES</h2>

    <p>
      Before running <span class="command"><strong>dnssec-signzone</strong></span>, you can ensure
      that the delegations are up-to-date by running
      <span class="command"><strong>dnssec-cds</strong></span> on every <code class="filename">dsset-</code> file.
    </p>
    <p>
      To fetch the child records required by <span class="command"><strong>dnssec-cds</strong></span>
      you can invoke <span class="command"><strong>dig</strong></span> as in the script below.  It's
      okay if the <span class="command"><strong>dig</strong></span> fails since
      <span class="command"><strong>dnssec-cds</strong></span> performs all the necessary checking.
    </p>
<pre class="programlisting">for f in dsset-*
do
	d=${f#dsset-}
	dig +dnssec +noall +answer $d DNSKEY $d CDNSKEY $d CDS |
	dnssec-cds -i -f /dev/stdin -d $f $d
done
</pre>

    <p>
      When the parent zone is automatically signed by
      <span class="command"><strong>named</strong></span>, you can use <span class="command"><strong>dnssec-cds</strong></span>
      with <span class="command"><strong>nsupdate</strong></span> to maintain a delegation as follows.
      The <code class="filename">dsset-</code> file allows the script to avoid
      having to fetch and validate the parent DS records, and it keeps the
      replay attack protection time.
    </p>
<pre class="programlisting">
dig +dnssec +noall +answer $d DNSKEY $d CDNSKEY $d CDS |
dnssec-cds -u -i -f /dev/stdin -d $f $d |
nsupdate -l
</pre>
  </div>

  <div class="refsection">
<a name="id-1.14.6.11"></a><h2>SEE ALSO</h2>

    <p>
      <span class="citerefentry">
        <span class="refentrytitle">dig</span>(1)
      </span>,
      <span class="citerefentry">
        <span class="refentrytitle">dnssec-settime</span>(8)
      </span>,
      <span class="citerefentry">
        <span class="refentrytitle">dnssec-signzone</span>(8)
      </span>,
      <span class="citerefentry">
        <span class="refentrytitle">nsupdate</span>(1)
      </span>,
      <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
      <em class="citetitle">RFC 7344</em>.
    </p>

  </div>

</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="man.dig.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch13.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="man.dnssec-checkds.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">dig </td>
<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
<td width="40%" align="right" valign="top"> <span class="application">dnssec-checkds</span>
</td>
</tr>
</table>
</div>
Tinderbox User's avatar
Tinderbox User committed
368
<p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.12.0b2</p>
369 370
</body>
</html>