Bv9ARM.ch06.html 199 KB
Newer Older
Mark Andrews's avatar
regen  
Mark Andrews committed
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 3 4 5 6 7
<HTML
><HEAD
><TITLE
>BIND 9 Configuration Reference</TITLE
><META
NAME="GENERATOR"
Mark Andrews's avatar
regen  
Mark Andrews committed
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
9
REL="HOME"
Andreas Gustafsson's avatar
Andreas Gustafsson committed
10
TITLE="BIND 9 Administrator Reference Manual"
11 12 13 14 15 16 17 18
HREF="Bv9ARM.html"><LINK
REL="PREVIOUS"
TITLE="The BIND 9 Lightweight Resolver"
HREF="Bv9ARM.ch05.html"><LINK
REL="NEXT"
TITLE="BIND 9 Security Considerations"
HREF="Bv9ARM.ch07.html"></HEAD
><BODY
Andreas Gustafsson's avatar
Andreas Gustafsson committed
19
CLASS="chapter"
20 21 22 23 24 25 26 27
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
Mark Andrews's avatar
Mark Andrews committed
28
SUMMARY="Header navigation table"
29 30 31 32 33 34 35 36
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
Andreas Gustafsson's avatar
Andreas Gustafsson committed
37
>BIND 9 Administrator Reference Manual</TH
38 39 40 41 42 43 44 45
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="Bv9ARM.ch05.html"
Mark Andrews's avatar
Mark Andrews committed
46
ACCESSKEY="P"
47 48 49 50 51 52 53 54 55 56 57 58 59
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="Bv9ARM.ch07.html"
Mark Andrews's avatar
Mark Andrews committed
60
ACCESSKEY="N"
61 62 63 64 65 66 67 68 69 70 71 72
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="chapter"
><H1
><A
NAME="ch06"
Mark Andrews's avatar
regen  
Mark Andrews committed
73 74
></A
>Chapter 6. <ACRONYM
75
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
76 77
>BIND</ACRONYM
> 9 Configuration Reference</H1
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>6.1. <A
HREF="Bv9ARM.ch06.html#configuration_file_elements"
>Configuration File Elements</A
></DT
><DT
>6.2. <A
HREF="Bv9ARM.ch06.html#Configuration_File_Grammar"
>Configuration File Grammar</A
></DT
><DT
>6.3. <A
Mark Andrews's avatar
regen  
Mark Andrews committed
97
HREF="Bv9ARM.ch06.html#AEN4148"
98 99 100 101 102
>Zone File</A
></DT
></DL
></DIV
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
103
><ACRONYM
104
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
105
>BIND</ACRONYM
Andreas Gustafsson's avatar
Andreas Gustafsson committed
106
> 9 configuration is broadly similar
Mark Andrews's avatar
regen  
Mark Andrews committed
107
to <ACRONYM
108
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
109
>BIND</ACRONYM
Andreas Gustafsson's avatar
Andreas Gustafsson committed
110
> 8; however, there are a few new areas
Mark Andrews's avatar
regen  
Mark Andrews committed
111
of configuration, such as views. <ACRONYM
112
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
113
>BIND</ACRONYM
114
>
Mark Andrews's avatar
regen  
Mark Andrews committed
115
8 configuration files should work with few alterations in <ACRONYM
116
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
117
>BIND</ACRONYM
118 119 120
>
9, although more complex configurations should be reviewed to check
if they can be more efficiently implemented using the new features
Mark Andrews's avatar
regen  
Mark Andrews committed
121
found in <ACRONYM
122
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
123
>BIND</ACRONYM
124 125
> 9.</P
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
126
><ACRONYM
127
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
128
>BIND</ACRONYM
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
> 4 configuration files can be converted to the new format
using the shell script
<TT
CLASS="filename"
>contrib/named-bootconf/named-bootconf.sh</TT
>.</P
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="configuration_file_elements"
>6.1. Configuration File Elements</A
></H1
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
144
>Following is a list of elements used throughout the <ACRONYM
145
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
146
>BIND</ACRONYM
147 148 149 150
> configuration
file documentation:</P
><DIV
CLASS="informaltable"
Mark Andrews's avatar
regen  
Mark Andrews committed
151 152
><P
></P
Andreas Gustafsson's avatar
Andreas Gustafsson committed
153
><A
Mark Andrews's avatar
regen  
Mark Andrews committed
154
NAME="AEN1088"
Andreas Gustafsson's avatar
Andreas Gustafsson committed
155
></A
156
><TABLE
Andreas Gustafsson's avatar
Andreas Gustafsson committed
157
CELLPADDING="3"
158 159
BORDER="1"
CLASS="CALSTABLE"
Andreas Gustafsson's avatar
Andreas Gustafsson committed
160
><TBODY
161 162 163
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
164
><VAR
165
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
166
>acl_name</VAR
167 168 169 170
></P
></TD
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
171
>The name of an <VAR
172
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
173
>address_match_list</VAR
174 175 176 177 178 179 180 181 182 183
> as
defined by the <B
CLASS="command"
>acl</B
> statement.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
184
><VAR
185
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
186
>address_match_list</VAR
187 188 189 190
></P
></TD
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
191
>A list of one or more <VAR
192
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
193
>ip_addr</VAR
Andreas Gustafsson's avatar
Andreas Gustafsson committed
194
>, 
Mark Andrews's avatar
regen  
Mark Andrews committed
195
<VAR
196
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
197 198
>ip_prefix</VAR
>, <VAR
199
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
200
>key_id</VAR
Andreas Gustafsson's avatar
Andreas Gustafsson committed
201
>, 
Mark Andrews's avatar
regen  
Mark Andrews committed
202
or <VAR
203
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
204
>acl_name</VAR
205
> elements, see
206 207 208 209 210 211 212 213 214
<A
HREF="Bv9ARM.ch06.html#address_match_lists"
>Section 6.1.1</A
>.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
215
><VAR
216
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
217
>domain_name</VAR
218 219 220 221 222
></P
></TD
><TD
><P
>A quoted string which will be used as
Mark Andrews's avatar
regen  
Mark Andrews committed
223
a DNS name, for example "<VAR
Andreas Gustafsson's avatar
Andreas Gustafsson committed
224
CLASS="literal"
Mark Andrews's avatar
regen  
Mark Andrews committed
225
>my.test.domain</VAR
226 227 228 229 230 231
>".</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
232
><VAR
233
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
234
>dotted_decimal</VAR
235 236 237 238
></P
></TD
><TD
><P
Andreas Gustafsson's avatar
Andreas Gustafsson committed
239
>One to four integers valued 0 through
Andreas Gustafsson's avatar
Andreas Gustafsson committed
240
255 separated by dots (`.'), such as <B
241 242
CLASS="command"
>123</B
Andreas Gustafsson's avatar
Andreas Gustafsson committed
243 244
>, 
<B
245 246 247 248 249 250 251 252 253 254 255
CLASS="command"
>45.67</B
> or <B
CLASS="command"
>89.123.45.67</B
>.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
256
><VAR
257
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
258
>ip4_addr</VAR
259 260 261 262 263
></P
></TD
><TD
><P
>An IPv4 address with exactly four elements
Mark Andrews's avatar
regen  
Mark Andrews committed
264
in <VAR
265
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
266
>dotted_decimal</VAR
267 268 269 270 271 272
> notation.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
273
><VAR
274
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
275
>ip6_addr</VAR
276 277 278 279 280 281
></P
></TD
><TD
><P
>An IPv6 address, such as <B
CLASS="command"
Mark Andrews's avatar
regen  
Mark Andrews committed
282
>2001:db8::1234</B
Mark Andrews's avatar
Mark Andrews committed
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
>.
IPv6 scoped addresses that have ambiguity on their scope zones must be
disambiguated by an appropriate zone ID with the percent character
(`%') as delimiter.
It is strongly recommended to use string zone names rather than
numeric identifiers, in order to be robust against system
configuration changes.
However, since there is no standard mapping for such names and
identifier values, currently only interface names as link identifiers
are supported, assuming one-to-one mapping between interfaces and links.
For example, a link-local address <B
CLASS="command"
>fe80::1</B
> on the
link attached to the interface <B
CLASS="command"
>ne0</B
>
can be specified as <B
CLASS="command"
>fe80::1%ne0</B
>.
Note that on most systems link-local addresses always have the
ambiguity, and need to be disambiguated.</P
307 308 309 310 311
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
312
><VAR
313
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
314
>ip_addr</VAR
315 316 317 318
></P
></TD
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
319
>An <VAR
320
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
321 322
>ip4_addr</VAR
> or <VAR
323
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
324
>ip6_addr</VAR
325 326 327 328 329 330
>.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
331
><VAR
332
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
333
>ip_port</VAR
334 335 336 337
></P
></TD
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
338
>An IP port <VAR
339
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
340
>number</VAR
341
>.
Mark Andrews's avatar
regen  
Mark Andrews committed
342
<VAR
343
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
344
>number</VAR
345
> is limited to 0 through 65535, with values
Andreas Gustafsson's avatar
Andreas Gustafsson committed
346 347
below 1024 typically restricted to use by processes running as root.
In some cases an asterisk (`*') character can be used as a placeholder to
348 349 350 351 352 353
select a random high-numbered port.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
354
><VAR
355
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
356
>ip_prefix</VAR
357 358 359 360
></P
></TD
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
361
>An IP network specified as an <VAR
362
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
363
>ip_addr</VAR
364 365
>,
followed by a slash (`/') and then the number of bits in the netmask.
Mark Andrews's avatar
regen  
Mark Andrews committed
366
Trailing zeros in a <VAR
367
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
368
>ip_addr</VAR
369
> may omitted.
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395
For example, <B
CLASS="command"
>127/8</B
> is the network <B
CLASS="command"
>127.0.0.0</B
> with
netmask <B
CLASS="command"
>255.0.0.0</B
> and <B
CLASS="command"
>1.2.3.0/28</B
> is
network <B
CLASS="command"
>1.2.3.0</B
> with netmask <B
CLASS="command"
>255.255.255.240</B
>.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
396
><VAR
397
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
398
>key_id</VAR
399 400 401 402
></P
></TD
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
403
>A <VAR
404
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
405
>domain_name</VAR
406 407 408 409 410 411 412
> representing
the name of a shared key, to be used for transaction security.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
413
><VAR
414
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
415
>key_list</VAR
416 417 418 419
></P
></TD
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
420
>A list of one or more <VAR
421
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
422
>key_id</VAR
423 424 425 426 427 428 429
>s,
separated by semicolons and ending with a semicolon.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
430
><VAR
431
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
432
>number</VAR
433 434 435 436
></P
></TD
><TD
><P
Andreas Gustafsson's avatar
Andreas Gustafsson committed
437 438 439
>A non-negative 32 bit integer
(i.e., a number between 0 and 4294967295, inclusive).
Its acceptable value might further
440 441 442 443 444 445
be limited by the context in which it is used.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
446
><VAR
447
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
448
>path_name</VAR
449 450 451 452 453 454 455 456 457 458 459 460 461 462
></P
></TD
><TD
><P
>A quoted string which will be used as
a pathname, such as <TT
CLASS="filename"
>zones/master/my.test.domain</TT
>.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
463
><VAR
464
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
465
>size_spec</VAR
466 467 468 469
></P
></TD
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
470
>A number, the word <KBD
471
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
472
>unlimited</KBD
473
>,
Mark Andrews's avatar
regen  
Mark Andrews committed
474
or the word <KBD
475
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
476
>default</KBD
477 478
>.</P
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
479
>&#13;An <VAR
480
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
481 482
>unlimited</VAR
> <VAR
483
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
484
>size_spec</VAR
485
> requests unlimited
Mark Andrews's avatar
regen  
Mark Andrews committed
486
use, or the maximum available amount. A <VAR
487
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
488
>default size_spec</VAR
489 490 491
> uses
the limit that was in force when the server was started.</P
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
492
>A <VAR
493
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
494
>number</VAR
495
> can
Mark Andrews's avatar
regen  
Mark Andrews committed
496
optionally be followed by a scaling factor: <KBD
497
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
498 499
>K</KBD
> or <KBD
500
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
501
>k</KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
502
> for
Mark Andrews's avatar
regen  
Mark Andrews committed
503
kilobytes, <KBD
504
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
505 506
>M</KBD
> or <KBD
507
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
508
>m</KBD
509
> for
Mark Andrews's avatar
regen  
Mark Andrews committed
510
megabytes, and <KBD
511
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
512 513
>G</KBD
> or <KBD
514
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
515
>g</KBD
516 517
> for gigabytes,
which scale by 1024, 1024*1024, and 1024*1024*1024 respectively.</P
Andreas Gustafsson's avatar
Andreas Gustafsson committed
518 519 520 521
>
<P
>The value must be representable as a 64-bit unsigned integer
(0 to 18446744073709551615, inclusive).
Mark Andrews's avatar
regen  
Mark Andrews committed
522
Using <VAR
523
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
524
>unlimited</VAR
525 526 527 528 529 530 531
> is the best way
to safely set a really large number.</P
></TD
></TR
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
532
><VAR
533
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
534
>yes_or_no</VAR
535 536 537 538
></P
></TD
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
539
>Either <KBD
540
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
541 542
>yes</KBD
> or <KBD
543
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
544
>no</KBD
545
>.
Mark Andrews's avatar
regen  
Mark Andrews committed
546
The words <KBD
547
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
548 549
>true</KBD
> and <KBD
550
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
551
>false</KBD
552
> are
Mark Andrews's avatar
regen  
Mark Andrews committed
553
also accepted, as are the numbers <KBD
554
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
555 556
>1</KBD
> and <KBD
557
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
558
>0</KBD
559 560 561
>.</P
></TD
></TR
Andreas Gustafsson's avatar
Andreas Gustafsson committed
562 563 564
><TR
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
565
><VAR
Andreas Gustafsson's avatar
Andreas Gustafsson committed
566
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
567
>dialup_option</VAR
Andreas Gustafsson's avatar
Andreas Gustafsson committed
568 569 570 571
></P
></TD
><TD
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
572
>One of <KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
573
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
574
>yes</KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
575
>,
Mark Andrews's avatar
regen  
Mark Andrews committed
576
<KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
577
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
578 579
>no</KBD
>, <KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
580
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
581
>notify</KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
582
>,
Mark Andrews's avatar
regen  
Mark Andrews committed
583
<KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
584
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
585 586
>notify-passive</KBD
>, <KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
587
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
588
>refresh</KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
589
> or
Mark Andrews's avatar
regen  
Mark Andrews committed
590
<KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
591
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
592
>passive</KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
593
>.
Mark Andrews's avatar
regen  
Mark Andrews committed
594
When used in a zone, <KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
595
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
596
>notify-passive</KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
597
>,
Mark Andrews's avatar
regen  
Mark Andrews committed
598
<KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
599
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
600 601
>refresh</KBD
>, and <KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
602
CLASS="userinput"
Mark Andrews's avatar
regen  
Mark Andrews committed
603
>passive</KBD
Andreas Gustafsson's avatar
Andreas Gustafsson committed
604 605 606 607
>
are restricted to slave and stub zones.</P
></TD
></TR
Andreas Gustafsson's avatar
Andreas Gustafsson committed
608
></TBODY
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625
></TABLE
><P
></P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="address_match_lists"
>6.1.1. Address Match Lists</A
></H2
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
Mark Andrews's avatar
regen  
Mark Andrews committed
626
NAME="AEN1253"
627 628 629 630
>6.1.1.1. Syntax</A
></H3
><PRE
CLASS="programlisting"
Mark Andrews's avatar
regen  
Mark Andrews committed
631
><VAR
632
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
633
>address_match_list</VAR
634 635 636 637 638
> = address_match_list_element ;
  [<SPAN
CLASS="optional"
> address_match_list_element; ... </SPAN
>]
Mark Andrews's avatar
regen  
Mark Andrews committed
639
<VAR
640
CLASS="varname"
Mark Andrews's avatar
regen  
Mark Andrews committed
641
>address_match_list_element</VAR
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656
> = [<SPAN
CLASS="optional"
> ! </SPAN
>] (ip_address [<SPAN
CLASS="optional"
>/length</SPAN
>] |
   key key_id | acl_name | { address_match_list } )
</PRE
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
Mark Andrews's avatar
regen  
Mark Andrews committed
657
NAME="AEN1261"
658 659 660 661
>6.1.1.2. Definition and Usage</A
></H3
><P
>Address match lists are primarily used to determine access
Andreas Gustafsson's avatar
Andreas Gustafsson committed
662 663
control for various server operations. They are also used in
the <B
664
CLASS="command"
Andreas Gustafsson's avatar
Andreas Gustafsson committed
665 666 667 668 669 670
>listen-on</B
> and <B
CLASS="command"
>sortlist</B
>
statements. The elements
671 672 673 674 675 676 677 678 679 680
which constitute an address match list can be any of the following:</P
><P
></P
><UL
><LI
><P
>an IP address (IPv4 or IPv6)</P
></LI
><LI
><P
Andreas Gustafsson's avatar
Andreas Gustafsson committed
681
>an IP prefix (in `/' notation)</P
682 683 684
></LI
><LI
><P
Andreas Gustafsson's avatar
Andreas Gustafsson committed
685 686 687 688
>a key ID, as defined by the <B
CLASS="command"
>key</B
> statement</P
689 690 691 692 693 694 695 696 697 698 699 700 701 702 703
></LI
><LI
><P
>the name of an address match list previously defined with
the <B
CLASS="command"
>acl</B
> statement</P
></LI
><LI
><P
>a nested address match list enclosed in braces</P
></LI
></UL
><P
Andreas Gustafsson's avatar
Andreas Gustafsson committed
704 705
>Elements can be negated with a leading exclamation mark (`!'),
and the match list names "any", "none", "localhost", and "localnets"
706 707 708 709 710 711 712 713 714 715 716
are predefined. More information on those names can be found in
the description of the acl statement.</P
><P
>The addition of the key clause made the name of this syntactic
element something of a misnomer, since security keys can be used
to validate access without regard to a host or network address. Nonetheless,
the term "address match list" is still used throughout the documentation.</P
><P
>When a given IP address or prefix is compared to an address
match list, the list is traversed in order until an element matches.
The interpretation of a match depends on whether the list is being used
Andreas Gustafsson's avatar
Andreas Gustafsson committed
717
for access control, defining listen-on ports, or in a sortlist,
718 719 720 721 722 723
and whether the element was negated.</P
><P
>When used as an access control list, a non-negated match allows
access and a negated match denies access. If there is no match,
access is denied. The clauses <B
CLASS="command"
Andreas Gustafsson's avatar
Andreas Gustafsson committed
724 725 726 727
>allow-notify</B
>,
<B
CLASS="command"
728 729 730
>allow-query</B
>, <B
CLASS="command"
Mark Andrews's avatar
regen  
Mark Andrews committed
731 732 733 734
>allow-query-cache</B
>,
<B
CLASS="command"
735
>allow-transfer</B
Andreas Gustafsson's avatar
Andreas Gustafsson committed
736 737
>,
<B
738 739
CLASS="command"
>allow-update</B
Andreas Gustafsson's avatar
Andreas Gustafsson committed
740 741 742
>, <B
CLASS="command"
>allow-update-forwarding</B
Andreas Gustafsson's avatar
Andreas Gustafsson committed
743
>,
Andreas Gustafsson's avatar
Andreas Gustafsson committed
744
and <B
745 746
CLASS="command"
>blackhole</B
Mark Andrews's avatar
regen  
Mark Andrews committed
747 748 749 750
> all use address match lists.
Similarly, the listen-on option will cause the server to not accept
queries on any of the machine's addresses which do not match the
list.</P
751 752 753 754 755 756 757 758 759 760
><P
>Because of the first-match aspect of the algorithm, an element
that defines a subset of another element in the list should come
before the broader element, regardless of whether either is negated. For
example, in
<B
CLASS="command"
>1.2.3/24; ! 1.2.3.13;</B
> the 1.2.3.13 element is
completely useless because the algorithm will match any lookup for
Andreas Gustafsson's avatar
Andreas Gustafsson committed
761 762
1.2.3.13 to the 1.2.3/24 element.
Using <B
763 764 765 766 767 768 769 770 771 772 773 774
CLASS="command"
>! 1.2.3.13; 1.2.3/24</B
> fixes
that problem by having 1.2.3.13 blocked by the negation but all
other 1.2.3.* hosts fall through.</P
></DIV
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
Mark Andrews's avatar
regen  
Mark Andrews committed
775
NAME="AEN1293"
776 777 778
>6.1.2. Comment Syntax</A
></H2
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
779
>The <ACRONYM
780
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
781
>BIND</ACRONYM
782
> 9 comment syntax allows for comments to appear
Mark Andrews's avatar
regen  
Mark Andrews committed
783
anywhere that white space may appear in a <ACRONYM
784
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
785
>BIND</ACRONYM
786
> configuration
Andreas Gustafsson's avatar
Andreas Gustafsson committed
787 788
file. To appeal to programmers of all kinds, they can be written
in the C, C++, or shell/perl style.</P
789 790 791 792 793
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
Mark Andrews's avatar
regen  
Mark Andrews committed
794
NAME="AEN1298"
795 796 797 798 799
>6.1.2.1. Syntax</A
></H3
><P
><PRE
CLASS="programlisting"
Mark Andrews's avatar
regen  
Mark Andrews committed
800
>/* This is a <ACRONYM
801
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
802
>BIND</ACRONYM
803 804 805 806
> comment as in C */</PRE
>
<PRE
CLASS="programlisting"
Mark Andrews's avatar
regen  
Mark Andrews committed
807
>// This is a <ACRONYM
808
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
809
>BIND</ACRONYM
810 811 812 813
> comment as in C++</PRE
>
<PRE
CLASS="programlisting"
Mark Andrews's avatar
regen  
Mark Andrews committed
814
># This is a <ACRONYM
815
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
816
>BIND</ACRONYM
817 818 819 820 821 822 823 824 825
> comment as in common UNIX shells and perl</PRE
>
      </P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
Mark Andrews's avatar
regen  
Mark Andrews committed
826
NAME="AEN1307"
827 828 829 830
>6.1.2.2. Definition and Usage</A
></H3
><P
>Comments may appear anywhere that whitespace may appear in
Mark Andrews's avatar
regen  
Mark Andrews committed
831
a <ACRONYM
832
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
833
>BIND</ACRONYM
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868
> configuration file.</P
><P
>C-style comments start with the two characters /* (slash,
star) and end with */ (star, slash). Because they are completely
delimited with these characters, they can be used to comment only
a portion of a line or to span multiple lines.</P
><P
>C-style comments cannot be nested. For example, the following
is not valid because the entire comment ends with the first */:</P
><P
><PRE
CLASS="programlisting"
>/* This is the start of a comment.
   This is still part of the comment.
/* This is an incorrect attempt at nesting a comment. */
   This is no longer in any comment. */
</PRE
></P
><P
>C++-style comments start with the two characters // (slash,
slash) and continue to the end of the physical line. They cannot
be continued across multiple physical lines; to have one logical
comment span multiple lines, each line must use the // pair.</P
><P
>For example:</P
><P
><PRE
CLASS="programlisting"
>// This is the start of a comment.  The next line
// is a new comment, even though it is logically
// part of the previous comment.
</PRE
></P
><P
>Shell-style (or perl-style, if you prefer) comments start
Mark Andrews's avatar
regen  
Mark Andrews committed
869
with the character <VAR
870
CLASS="literal"
Mark Andrews's avatar
regen  
Mark Andrews committed
871
>#</VAR
872 873 874 875 876 877 878 879 880 881 882
> (number sign) and continue to the end of the
physical line, as in C++ comments.</P
><P
>For example:</P
><P
><PRE
CLASS="programlisting"
># This is the start of a comment.  The next line
# is a new comment, even though it is logically
# part of the previous comment.
</PRE
Andreas Gustafsson's avatar
Andreas Gustafsson committed
883 884
>
</P
885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
BORDER="1"
WIDTH="100%"
><TR
><TD
ALIGN="CENTER"
><B
>Warning</B
></TD
></TR
><TR
><TD
ALIGN="LEFT"
><P
Andreas Gustafsson's avatar
Andreas Gustafsson committed
904 905 906 907
>You cannot use the semicolon (`;') character
   to start a comment such as you would in a zone file. The
   semicolon indicates the end of a configuration
   statement.</P
908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="Configuration_File_Grammar"
>6.2. Configuration File Grammar</A
></H1
><P
Mark Andrews's avatar
regen  
Mark Andrews committed
924
>A <ACRONYM
925
CLASS="acronym"
Mark Andrews's avatar
regen  
Mark Andrews committed
926
>BIND</ACRONYM
927 928 929
> 9 configuration consists of statements and comments.
    Statements end with a semicolon. Statements and comments are the
    only elements that can appear without enclosing braces. Many
Andreas Gustafsson's avatar
Andreas Gustafsson committed
930
    statements contain a block of sub-statements, which are also
931 932 933 934 935
    terminated with a semicolon.</P
><P
>The following statements are supported:</P
><DIV
CLASS="informaltable"
Mark Andrews's avatar
regen  
Mark Andrews committed
936 937
><P
></P
Andreas Gustafsson's avatar
Andreas Gustafsson committed
938
><A
Mark Andrews's avatar
regen  
Mark Andrews committed
939
NAME="AEN1331"
Andreas Gustafsson's avatar
Andreas Gustafsson committed
940
></A
941
><TABLE
Andreas Gustafsson's avatar
Andreas Gustafsson committed
942
CELLPADDING="3"
943 944
BORDER="1"
CLASS="CALSTABLE"
Andreas Gustafsson's avatar
Andreas Gustafsson committed
945
><TBODY
946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022
><TR
><TD
><P
><B
CLASS="command"
>acl</B
></P
></TD
><TD
><P
>defines a named IP address
matching list, for access control and other uses.</P
></TD
></TR
><TR
><TD
><P
><B
CLASS="command"
>controls</B
></P
></TD
><TD
><P
>declares control channels to be used
by the <B
CLASS="command"
>rndc</B
> utility.</P
></TD
></TR
><TR
><TD
><P
><B
CLASS="command"
>include</B
></P
></TD
><TD
><P
>includes a file.</P
></TD
></TR
><TR
><TD
><P
><B
CLASS="command"
>key</B
></P
></TD
><TD
><P
>specifies key information for use in
authentication and authorization using TSIG.</P
></TD
></TR
><TR
><TD
><P
><B
CLASS="command"
>logging</B
></P
></TD
><TD
><P
>specifies what the server logs, and where
the log messages are sent.</P
></TD
></TR
><TR
><TD
><P
><B
CLASS="command"
Mark Andrews's avatar
regen  
Mark Andrews committed
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042
>lwres</B
></P
></TD
><TD
><P
>configures <B
CLASS="command"
>named</B
> to
also act as a light weight resolver daemon (<B
CLASS="command"
>lwresd</B
>).</P
></TD
></TR
><TR
><TD
><P
><B
CLASS="command"
Mark Andrews's avatar
Mark Andrews committed
1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056
>masters</B
></P
></TD
><TD
><P
>defines a named masters list for
inclusion in stub and slave zone masters clauses.</P
></TD
></TR
><TR
><TD
><P
><B
CLASS="command"
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118
>options</B
></P
></TD
><TD
><P
>controls global server configuration
options and sets defaults for other statements.</P
></TD
></TR
><TR
><TD
><P
><B
CLASS="command"
>server</B
></P
></TD
><TD
><P
>sets certain configuration options on
a per-server basis.</P
></TD
></TR
><TR
><TD
><P
><B
CLASS="command"
>trusted-keys</B
></P
></TD
><TD
><P
>defines trusted DNSSEC keys.</P
></TD
></TR
><TR
><TD
><P
><B
CLASS="command"
>view</B
></P
></TD
><TD
><P
>defines a view.</P
></TD
></TR
><TR
><TD
><P
><B
CLASS="command"
>zone</B
></P
></TD
><TD
><P
>defines a zone.</P
></TD
></TR
Andreas Gustafsson's avatar
Andreas Gustafsson committed
1119
></TBODY
1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138
></TABLE
><P
></P
></DIV
><P
>The <B
CLASS="command"
>logging</B
> and
    <B
CLASS="command"
>options</B
> statements may only occur once per
    configuration.</P
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
Mark Andrews's avatar
regen  
Mark Andrews committed
1139
NAME="AEN1414"
1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184
>6.2.1. <B
CLASS="command"
>acl</B
> Statement Grammar</A
></H2
><PRE
CLASS="programlisting"
><B
CLASS="command"
>acl</B
> acl-name { 
    address_match_list 
};
</PRE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="acl"
>6.2.2. <B
CLASS="command"
>acl</B
> Statement Definition and
Usage</A
></H2
><P
>The <B
CLASS="command"
>acl</B
> statement assigns a symbolic
      name to an address match list. It gets its name from a primary
      use of address match lists: Access Control Lists (ACLs).</P
><P
>Note that an address match list's name must be defined
      with <B
CLASS="command"
>acl</B
> before it can be used elsewhere; no
      forward references are allowed.</P
><P
>The following ACLs are built-in:</P
><DIV
CLASS="informaltable"
Mark Andrews's avatar
regen  
Mark Andrews committed
1185 1186
><P
></P
Andreas Gustafsson's avatar
Andreas Gustafsson committed
1187
><A
Mark Andrews's avatar
regen  
Mark Andrews committed
1188
NAME="AEN1427"
Andreas Gustafsson's avatar
Andreas Gustafsson committed
1189
></A