-
Notifications
You must be signed in to change notification settings - Fork 132
/
Bv9ARM.ch06.html
13810 lines (13342 loc) · 650 KB
/
Bv9ARM.ch06.html
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
368
369
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
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
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
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2004-2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter 6. BIND 9 Configuration Reference</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.html" title="BIND 9 Administrator Reference Manual">
<link rel="prev" href="Bv9ARM.ch05.html" title="Chapter 5. The BIND 9 Lightweight Resolver">
<link rel="next" href="Bv9ARM.ch07.html" title="Chapter 7. BIND 9 Security Considerations">
</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">Chapter 6. <acronym class="acronym">BIND</acronym> 9 Configuration Reference</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="Bv9ARM.ch05.html">Prev</a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="Bv9ARM.ch07.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="chapter">
<div class="titlepage"><div><div><h1 class="title">
<a name="Bv9ARM.ch06"></a>Chapter 6. <acronym class="acronym">BIND</acronym> 9 Configuration Reference</h1></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="section"><a href="Bv9ARM.ch06.html#configuration_file_elements">Configuration File Elements</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="Bv9ARM.ch06.html#address_match_lists">Address Match Lists</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#comment_syntax">Comment Syntax</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="Bv9ARM.ch06.html#Configuration_File_Grammar">Configuration File Grammar</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="Bv9ARM.ch06.html#acl_grammar"><span class="command"><strong>acl</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#acl"><span class="command"><strong>acl</strong></span> Statement Definition and
Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#controls_grammar"><span class="command"><strong>controls</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#controls_statement_definition_and_usage"><span class="command"><strong>controls</strong></span> Statement Definition and
Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#include_grammar"><span class="command"><strong>include</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#include_statement"><span class="command"><strong>include</strong></span> Statement Definition and Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#key_grammar"><span class="command"><strong>key</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#key_statement"><span class="command"><strong>key</strong></span> Statement Definition and Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#logging_grammar"><span class="command"><strong>logging</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#logging_statement"><span class="command"><strong>logging</strong></span> Statement Definition and Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#lwres_grammar"><span class="command"><strong>lwres</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#lwres_statement"><span class="command"><strong>lwres</strong></span> Statement Definition and Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#masters_grammar"><span class="command"><strong>masters</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#masters_statement"><span class="command"><strong>masters</strong></span> Statement Definition and
Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#options_grammar"><span class="command"><strong>options</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#options"><span class="command"><strong>options</strong></span> Statement Definition and
Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#server_statement_grammar"><span class="command"><strong>server</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#server_statement_definition_and_usage"><span class="command"><strong>server</strong></span> Statement Definition and
Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#statschannels"><span class="command"><strong>statistics-channels</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#statistics_channels"><span class="command"><strong>statistics-channels</strong></span> Statement Definition and
Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#trusted-keys"><span class="command"><strong>trusted-keys</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#trusted_keys"><span class="command"><strong>trusted-keys</strong></span> Statement Definition
and Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#managed_keys"><span class="command"><strong>managed-keys</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#managed-keys"><span class="command"><strong>managed-keys</strong></span> Statement Definition
and Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#view_statement_grammar"><span class="command"><strong>view</strong></span> Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#view_statement"><span class="command"><strong>view</strong></span> Statement Definition and Usage</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#zone_statement_grammar"><span class="command"><strong>zone</strong></span>
Statement Grammar</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#zone_statement"><span class="command"><strong>zone</strong></span> Statement Definition and Usage</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="Bv9ARM.ch06.html#zone_file">Zone File</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="Bv9ARM.ch06.html#types_of_resource_records_and_when_to_use_them">Types of Resource Records and When to Use Them</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#mx_records">Discussion of MX Records</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#Setting_TTLs">Setting TTLs</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#ipv4_reverse">Inverse Mapping in IPv4</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#zone_directives">Other Zone File Directives</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#generate_directive"><acronym class="acronym">BIND</acronym> Master File Extension: the <span class="command"><strong>$GENERATE</strong></span> Directive</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#zonefile_format">Additional File Formats</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="Bv9ARM.ch06.html#statistics">BIND9 Statistics</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="Bv9ARM.ch06.html#statsfile">The Statistics File</a></span></dt>
<dt><span class="section"><a href="Bv9ARM.ch06.html#statistics_counters">Statistics Counters</a></span></dt>
</dl></dd>
</dl>
</div>
<p>
<acronym class="acronym">BIND</acronym> 9 configuration is broadly similar
to <acronym class="acronym">BIND</acronym> 8; however, there are a few new
areas
of configuration, such as views. <acronym class="acronym">BIND</acronym>
8 configuration files should work with few alterations in <acronym class="acronym">BIND</acronym>
9, although more complex configurations should be reviewed to check
if they can be more efficiently implemented using the new features
found in <acronym class="acronym">BIND</acronym> 9.
</p>
<p>
<acronym class="acronym">BIND</acronym> 4 configuration files can be
converted to the new format
using the shell script
<code class="filename">contrib/named-bootconf/named-bootconf.sh</code>.
</p>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="configuration_file_elements"></a>Configuration File Elements</h2></div></div></div>
<p>
Following is a list of elements used throughout the <acronym class="acronym">BIND</acronym> configuration
file documentation:
</p>
<div class="informaltable">
<table border="1">
<colgroup>
<col width="1.855in" class="1">
<col width="3.770in" class="2">
</colgroup>
<tbody>
<tr>
<td>
<p>
<code class="varname">acl_name</code>
</p>
</td>
<td>
<p>
The name of an <code class="varname">address_match_list</code> as
defined by the <span class="command"><strong>acl</strong></span> statement.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">address_match_list</code>
</p>
</td>
<td>
<p>
A list of one or more
<code class="varname">ip_addr</code>,
<code class="varname">ip_prefix</code>, <code class="varname">key_id</code>,
or <code class="varname">acl_name</code> elements, see
<a class="xref" href="Bv9ARM.ch06.html#address_match_lists" title="Address Match Lists">the section called “Address Match Lists”</a>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">masters_list</code>
</p>
</td>
<td>
<p>
A named list of one or more <code class="varname">ip_addr</code>
with optional <code class="varname">key_id</code> and/or
<code class="varname">ip_port</code>.
A <code class="varname">masters_list</code> may include other
<code class="varname">masters_lists</code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">domain_name</code>
</p>
</td>
<td>
<p>
A quoted string which will be used as
a DNS name, for example "<code class="literal">my.test.domain</code>".
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">namelist</code>
</p>
</td>
<td>
<p>
A list of one or more <code class="varname">domain_name</code>
elements.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">dotted_decimal</code>
</p>
</td>
<td>
<p>
One to four integers valued 0 through
255 separated by dots (`.'), such as <span class="command"><strong>123</strong></span>,
<span class="command"><strong>45.67</strong></span> or <span class="command"><strong>89.123.45.67</strong></span>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">ip4_addr</code>
</p>
</td>
<td>
<p>
An IPv4 address with exactly four elements
in <code class="varname">dotted_decimal</code> notation.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">ip6_addr</code>
</p>
</td>
<td>
<p>
An IPv6 address, such as <span class="command"><strong>2001:db8::1234</strong></span>.
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 <span class="command"><strong>fe80::1</strong></span> on the link
attached to the interface <span class="command"><strong>ne0</strong></span>
can be specified as <span class="command"><strong>fe80::1%ne0</strong></span>.
Note that on most systems link-local addresses
always have the ambiguity, and need to be
disambiguated.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">ip_addr</code>
</p>
</td>
<td>
<p>
An <code class="varname">ip4_addr</code> or <code class="varname">ip6_addr</code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">ip_dscp</code>
</p>
</td>
<td>
<p>
A <code class="varname">number</code> between 0 and 63, used
to select a differentiated services code point (DSCP)
value for use with outgoing traffic on operating systems
that support DSCP.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">ip_port</code>
</p>
</td>
<td>
<p>
An IP port <code class="varname">number</code>.
The <code class="varname">number</code> is limited to 0
through 65535, with values
below 1024 typically restricted to use by processes running
as root.
In some cases, an asterisk (`*') character can be used as a
placeholder to
select a random high-numbered port.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">ip_prefix</code>
</p>
</td>
<td>
<p>
An IP network specified as an <code class="varname">ip_addr</code>,
followed by a slash (`/') and then the number of bits in the
netmask.
Trailing zeros in a <code class="varname">ip_addr</code>
may omitted.
For example, <span class="command"><strong>127/8</strong></span> is the
network <span class="command"><strong>127.0.0.0</strong></span> with
netmask <span class="command"><strong>255.0.0.0</strong></span> and <span class="command"><strong>1.2.3.0/28</strong></span> is
network <span class="command"><strong>1.2.3.0</strong></span> with netmask <span class="command"><strong>255.255.255.240</strong></span>.
</p>
<p>
When specifying a prefix involving a IPv6 scoped address
the scope may be omitted. In that case the prefix will
match packets from any scope.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">key_id</code>
</p>
</td>
<td>
<p>
A <code class="varname">domain_name</code> representing
the name of a shared key, to be used for transaction
security.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">key_list</code>
</p>
</td>
<td>
<p>
A list of one or more
<code class="varname">key_id</code>s,
separated by semicolons and ending with a semicolon.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">number</code>
</p>
</td>
<td>
<p>
A non-negative 32-bit integer
(i.e., a number between 0 and 4294967295, inclusive).
Its acceptable value might be further
limited by the context in which it is used.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">fixedpoint</code>
</p>
</td>
<td>
<p>
A non-negative real number that can be specified to
the nearest one hundredth. Up to five digits can be
specified before a decimal point, and up to two
digits after, so the maximum value is 99999.99.
Acceptable values might be further limited by the
context in which it is used.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">path_name</code>
</p>
</td>
<td>
<p>
A quoted string which will be used as
a pathname, such as <code class="filename">zones/master/my.test.domain</code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">port_list</code>
</p>
</td>
<td>
<p>
A list of an <code class="varname">ip_port</code> or a port
range.
A port range is specified in the form of
<strong class="userinput"><code>range</code></strong> followed by
two <code class="varname">ip_port</code>s,
<code class="varname">port_low</code> and
<code class="varname">port_high</code>, which represents
port numbers from <code class="varname">port_low</code> through
<code class="varname">port_high</code>, inclusive.
<code class="varname">port_low</code> must not be larger than
<code class="varname">port_high</code>.
For example,
<strong class="userinput"><code>range 1024 65535</code></strong> represents
ports from 1024 through 65535.
In either case an asterisk (`*') character is not
allowed as a valid <code class="varname">ip_port</code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">size_spec</code>
</p>
</td>
<td>
<p>
A 64-bit unsigned integer, or the keywords
<strong class="userinput"><code>unlimited</code></strong> or
<strong class="userinput"><code>default</code></strong>.
</p>
<p>
Integers may take values
0 <= value <= 18446744073709551615, though
certain parameters
(such as <span class="command"><strong>max-journal-size</strong></span>) may
use a more limited range within these extremes.
In most cases, setting a value to 0 does not
literally mean zero; it means "undefined" or
"as big as possible", depending on the context.
See the explanations of particular parameters
that use <code class="varname">size_spec</code>
for details on how they interpret its use.
</p>
<p>
Numeric values can optionally be followed by a
scaling factor:
<strong class="userinput"><code>K</code></strong> or <strong class="userinput"><code>k</code></strong>
for kilobytes,
<strong class="userinput"><code>M</code></strong> or <strong class="userinput"><code>m</code></strong>
for megabytes, and
<strong class="userinput"><code>G</code></strong> or <strong class="userinput"><code>g</code></strong>
for gigabytes, which scale by 1024, 1024*1024, and
1024*1024*1024 respectively.
</p>
<p>
<code class="varname">unlimited</code> generally means
"as big as possible", and is usually the best
way to safely set a very large number.
</p>
<p>
<code class="varname">default</code>
uses the limit that was in force when the server was started.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">yes_or_no</code>
</p>
</td>
<td>
<p>
Either <strong class="userinput"><code>yes</code></strong> or <strong class="userinput"><code>no</code></strong>.
The words <strong class="userinput"><code>true</code></strong> and <strong class="userinput"><code>false</code></strong> are
also accepted, as are the numbers <strong class="userinput"><code>1</code></strong>
and <strong class="userinput"><code>0</code></strong>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="varname">dialup_option</code>
</p>
</td>
<td>
<p>
One of <strong class="userinput"><code>yes</code></strong>,
<strong class="userinput"><code>no</code></strong>, <strong class="userinput"><code>notify</code></strong>,
<strong class="userinput"><code>notify-passive</code></strong>, <strong class="userinput"><code>refresh</code></strong> or
<strong class="userinput"><code>passive</code></strong>.
When used in a zone, <strong class="userinput"><code>notify-passive</code></strong>,
<strong class="userinput"><code>refresh</code></strong>, and <strong class="userinput"><code>passive</code></strong>
are restricted to slave and stub zones.
</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="address_match_lists"></a>Address Match Lists</h3></div></div></div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="id-1.7.4.4.2"></a>Syntax</h4></div></div></div>
<pre class="programlisting"><em class="replaceable"><code>address_match_list</code></em> = <em class="replaceable"><code>address_match_list_element</code></em> <span class="command"><strong>;</strong></span> ...
<em class="replaceable"><code>address_match_list_element</code></em> = [ <span class="command"><strong>!</strong></span> ] ( <em class="replaceable"><code>ip_address</code></em> | <em class="replaceable"><code>ip_prefix</code></em> |
<span class="command"><strong>key</strong></span> <em class="replaceable"><code>key_id</code></em> | <em class="replaceable"><code>acl_name</code></em> | <span class="command"><strong>{</strong></span> <em class="replaceable"><code>address_match_list</code></em> <span class="command"><strong>}</strong></span> )
</pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="id-1.7.4.4.3"></a>Definition and Usage</h4></div></div></div>
<p>
Address match lists are primarily used to determine access
control for various server operations. They are also used in
the <span class="command"><strong>listen-on</strong></span> and <span class="command"><strong>sortlist</strong></span>
statements. The elements which constitute an address match
list can be any of the following:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
an IP address (IPv4 or IPv6)
</li>
<li class="listitem">
an IP prefix (in `/' notation)
</li>
<li class="listitem">
a key ID, as defined by the <span class="command"><strong>key</strong></span>
statement
</li>
<li class="listitem">
the name of an address match list defined with
the <span class="command"><strong>acl</strong></span> statement
</li>
<li class="listitem">
a nested address match list enclosed in braces
</li>
</ul></div>
<p>
Elements can be negated with a leading exclamation mark (`!'),
and the match list names "any", "none", "localhost", and
"localnets" 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 comparison takes place in approximately O(1)
time. However, key comparisons require that the list of keys
be traversed until a matching key is found, and therefore may
be somewhat slower.
</p>
<p>
The interpretation of a match depends on whether the list is being
used for access control, defining <span class="command"><strong>listen-on</strong></span> ports, or in a
<span class="command"><strong>sortlist</strong></span>, 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
<span class="command"><strong>allow-notify</strong></span>,
<span class="command"><strong>allow-recursion</strong></span>,
<span class="command"><strong>allow-recursion-on</strong></span>,
<span class="command"><strong>allow-query</strong></span>,
<span class="command"><strong>allow-query-on</strong></span>,
<span class="command"><strong>allow-query-cache</strong></span>,
<span class="command"><strong>allow-query-cache-on</strong></span>,
<span class="command"><strong>allow-transfer</strong></span>,
<span class="command"><strong>allow-update</strong></span>,
<span class="command"><strong>allow-update-forwarding</strong></span>, and
<span class="command"><strong>blackhole</strong></span> all use address match
lists. Similarly, the <span class="command"><strong>listen-on</strong></span> option will cause the
server to refuse queries on any of the machine's
addresses which do not match the list.
</p>
<p>
Order of insertion is significant. If more than one element
in an ACL is found to match a given IP address or prefix,
preference will be given to the one that came
<span class="emphasis"><em>first</em></span> in the ACL definition.
Because of this first-match behavior, 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
<span class="command"><strong>1.2.3/24; ! 1.2.3.13;</strong></span>
the 1.2.3.13 element is completely useless because the
algorithm will match any lookup for 1.2.3.13 to the 1.2.3/24
element. Using <span class="command"><strong>! 1.2.3.13; 1.2.3/24</strong></span> 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="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="comment_syntax"></a>Comment Syntax</h3></div></div></div>
<p>
The <acronym class="acronym">BIND</acronym> 9 comment syntax allows for
comments to appear
anywhere that whitespace may appear in a <acronym class="acronym">BIND</acronym> configuration
file. To appeal to programmers of all kinds, they can be written
in the C, C++, or shell/perl style.
</p>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="id-1.7.4.5.3"></a>Syntax</h4></div></div></div>
<p>
</p>
<pre class="programlisting">/* This is a <acronym class="acronym">BIND</acronym> comment as in C */</pre>
<p>
</p>
<pre class="programlisting">// This is a <acronym class="acronym">BIND</acronym> comment as in C++</pre>
<p>
</p>
<pre class="programlisting"># This is a <acronym class="acronym">BIND</acronym> comment as in common UNIX shells
# and perl</pre>
<p>
</p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="id-1.7.4.5.4"></a>Definition and Usage</h4></div></div></div>
<p>
Comments may appear anywhere that whitespace may appear in
a <acronym class="acronym">BIND</acronym> 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>
</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>
<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.
For example:
</p>
<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>
<p>
Shell-style (or perl-style, if you prefer) comments start
with the character <code class="literal">#</code> (number sign)
and continue to the end of the
physical line, as in C++ comments.
For example:
</p>
<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>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p>
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>
</div>
</div>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="Configuration_File_Grammar"></a>Configuration File Grammar</h2></div></div></div>
<p>
A <acronym class="acronym">BIND</acronym> 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
statements contain a block of sub-statements, which are also
terminated with a semicolon.
</p>
<p>
The following statements are supported:
</p>
<div class="informaltable">
<table border="1">
<colgroup>
<col width="1.336in" class="1">
<col width="3.778in" class="2">
</colgroup>
<tbody>
<tr>
<td>
<p><span class="command"><strong>acl</strong></span></p>
</td>
<td>
<p>
defines a named IP address
matching list, for access control and other uses.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>controls</strong></span></p>
</td>
<td>
<p>
declares control channels to be used
by the <span class="command"><strong>rndc</strong></span> utility.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>include</strong></span></p>
</td>
<td>
<p>
includes a file.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>key</strong></span></p>
</td>
<td>
<p>
specifies key information for use in
authentication and authorization using TSIG.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>logging</strong></span></p>
</td>
<td>
<p>
specifies what the server logs, and where
the log messages are sent.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>lwres</strong></span></p>
</td>
<td>
<p>
configures <span class="command"><strong>named</strong></span> to
also act as a light-weight resolver daemon (<span class="command"><strong>lwresd</strong></span>).
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>masters</strong></span></p>
</td>
<td>
<p>
defines a named masters list for
inclusion in stub and slave zones'
<span class="command"><strong>masters</strong></span> or
<span class="command"><strong>also-notify</strong></span> lists.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>options</strong></span></p>
</td>
<td>
<p>
controls global server configuration
options and sets defaults for other statements.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>server</strong></span></p>
</td>
<td>
<p>
sets certain configuration options on
a per-server basis.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>statistics-channels</strong></span></p>
</td>
<td>
<p>
declares communication channels to get access to
<span class="command"><strong>named</strong></span> statistics.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>trusted-keys</strong></span></p>
</td>
<td>
<p>
defines trusted DNSSEC keys.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>managed-keys</strong></span></p>
</td>
<td>
<p>
lists DNSSEC keys to be kept up to date
using RFC 5011 trust anchor maintenance.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>view</strong></span></p>
</td>
<td>
<p>
defines a view.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>zone</strong></span></p>
</td>
<td>
<p>
defines a zone.
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The <span class="command"><strong>logging</strong></span> and
<span class="command"><strong>options</strong></span> statements may only occur once
per
configuration.
</p>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="acl_grammar"></a><span class="command"><strong>acl</strong></span> Statement Grammar</h3></div></div></div>
<pre class="programlisting"><span class="command"><strong>acl</strong></span> <em class="replaceable"><code>acl-name</code></em> <span class="command"><strong>{</strong></span>
<em class="replaceable"><code>address_match_list</code></em>
<span class="command"><strong>};</strong></span>
</pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="acl"></a><span class="command"><strong>acl</strong></span> Statement Definition and
Usage</h3></div></div></div>
<p>
The <span class="command"><strong>acl</strong></span> 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>
The following ACLs are built-in:
</p>
<div class="informaltable">
<table border="1">
<colgroup>
<col width="1.130in" class="1">
<col width="4.000in" class="2">
</colgroup>
<tbody>
<tr>
<td>
<p><span class="command"><strong>any</strong></span></p>
</td>
<td>
<p>
Matches all hosts.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>none</strong></span></p>
</td>
<td>
<p>
Matches no hosts.
</p>
</td>
</tr>
<tr>
<td>
<p><span class="command"><strong>localhost</strong></span></p>
</td>
<td>
<p>
Matches the IPv4 and IPv6 addresses of all network
interfaces on the system. When addresses are
added or removed, the <span class="command"><strong>localhost</strong></span>
ACL element is updated to reflect the changes.
</p>
</td>
</tr>