source: server/major/bind.xml@ 53217a6

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 53217a6 was 53217a6, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Tagged bind.xml

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4342 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 21.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY bind-download-http "http://gd.tuwien.ac.at/infosys/servers/isc/bind9/&bind-version;/bind-&bind-version;.tar.gz">
8 <!ENTITY bind-download-ftp "ftp://ftp.isc.org/isc/bind9/&bind-version;/bind-&bind-version;.tar.gz">
9 <!ENTITY bind-md5sum "fdb42fff7e345372ac52a4493b77b694">
10 <!ENTITY bind-size "4.6 MB">
11 <!ENTITY bind-buildsize "87 MB">
12 <!ENTITY bind-time "1.87 SBU (additional 4.14 SBU to run the complete test suite)">
13]>
14
15<sect1 id="bind" xreflabel="BIND-&bind-version;p1">
16 <?dbhtml filename="bind.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>BIND-&bind-version;p1</title>
24
25 <indexterm zone="bind">
26 <primary sortas="a-BIND">BIND</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to BIND</title>
31
32 <para>The <application>BIND</application> package provides a DNS server
33 and client utilities. If you are only interested in the utilities, refer
34 to the <xref linkend="bind-utils"/>.</para>
35
36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
39 <para>Download (HTTP): <ulink url="&bind-download-http;"/></para>
40 </listitem>
41 <listitem>
42 <para>Download (FTP): <ulink url="&bind-download-ftp;"/></para>
43 </listitem>
44 <listitem>
45 <para>Download MD5 sum: &bind-md5sum;</para>
46 </listitem>
47 <listitem>
48 <para>Download size: &bind-size;</para>
49 </listitem>
50 <listitem>
51 <para>Estimated disk space required: &bind-buildsize;</para>
52 </listitem>
53 <listitem>
54 <para>Estimated build time: &bind-time;</para>
55 </listitem>
56 </itemizedlist>
57
58 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
59 <itemizedlist spacing='compact'>
60 <listitem>
61 <para><ulink
62 url="ftp://ftp.isc.org/isc/bind9/9.3.0/&bind-version;-patch1"/></para>
63 </listitem>
64 </itemizedlist>
65
66 <bridgehead renderas="sect3">BIND Dependencies</bridgehead>
67
68 <bridgehead renderas="sect4">Optional</bridgehead>
69 <para><xref linkend="openssl"/></para>
70
71 <bridgehead renderas="sect4">Optional (to Run the Full
72 Test Suite)</bridgehead>
73 <para><xref linkend="net-tools"/> (for <command>ifconfig</command>)
74 and <xref linkend="perl-modules"/>: Net-DNS</para>
75
76 <bridgehead renderas="sect4">Optional (to [Re]Build
77 Documentation)</bridgehead>
78 <para><xref linkend="openjade"/>,
79 <xref linkend="jadetex"/>,
80 <xref linkend="docbook-dsssl"/></para>
81
82 </sect2>
83
84 <sect2 role="installation">
85 <title>Installation of BIND</title>
86
87 <para>Install <application>BIND</application> by running the
88 following commands:</para>
89
90<screen><userinput>patch -Np1 -i ../&bind-version;-patch1 &amp;&amp;
91sed -i -e "s/dsssl-stylesheets/&amp;-1.78/g" configure &amp;&amp;
92./configure --prefix=/usr --sysconfdir=/etc \
93 --enable-threads --with-libtool &amp;&amp;
94make</userinput></screen>
95
96 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
97
98<screen role="root"><userinput>make install &amp;&amp;
99chmod 755 \
100 /usr/lib/{lib{bind9,isc{,cc,cfg},lwres}.so.?.?.?,libdns.so.20.0.0} &amp;&amp;
101mv -v /usr/share/man/man8/named.conf.5 /usr/share/man/man5 &amp;&amp;
102cd doc &amp;&amp;
103install -v -d -m755 /usr/share/doc/bind-9.3.0/{arm,draft,misc,rfc} &amp;&amp;
104install -v -m644 arm/*.html \
105 /usr/share/doc/bind-9.3.0/arm &amp;&amp;
106install -v -m644 draft/*.txt \
107 /usr/share/doc/bind-9.3.0/draft &amp;&amp;
108install -v -m644 rfc/* \
109 /usr/share/doc/bind-9.3.0/rfc &amp;&amp;
110install -v -m644 \
111 misc/{dnssec,ipv6,migrat*,options,rfc-compliance,roadmap,sdb} \
112 /usr/share/doc/bind-9.3.0/misc</userinput></screen>
113
114 <para>In order to run the complete test suite before installing the
115 package, you need to set up some dummy interfaces (requires
116 <command>ifconfig</command>). Issue the following commands to run the
117 complete suite of tests (you will have to be the <systemitem
118 class="username">root</systemitem> user to issue the
119 <command>ifconfig</command> commands):</para>
120
121<screen role="root"><userinput>bin/tests/system/ifconfig.sh up &amp;&amp;
122make check &gt;check.log 2&gt;&amp;1 &amp;&amp;
123bin/tests/system/ifconfig.sh down</userinput></screen>
124
125 <para>If desired, issue the following command to ensure all 145 tests
126 ran successfully:</para>
127
128<screen><userinput>grep "R:PASS" check.log | wc -l</userinput></screen>
129
130 </sect2>
131
132 <sect2 role="commands">
133 <title>Command Explanations</title>
134
135 <para><command>patch -Np1 -i ../&bind-version;-patch1</command>: There's a
136 vulnerability in the DNSSEC code. See
137 <ulink url="http://www.kb.cert.org/vuls/id/938617"/>. The patch fixes the
138 bug.</para>
139
140 <para><command>sed -i -e ... configure</command>: This command forces
141 <command>configure</command> to look for the DSSSL stylesheets in the
142 standard BLFS location.</para>
143
144 <para><parameter>--sysconfdir=/etc</parameter>: This parameter forces
145 <application>BIND</application> to look for configuration
146 files in <filename class='directory'>/etc</filename> instead of
147 <filename class='directory'>/usr/etc</filename>.</para>
148
149 <para><parameter>--enable-threads</parameter>: This parameter enables
150 multi-threading capability.</para>
151
152 <para><parameter>--with-libtool</parameter>: This parameter forces the
153 building of dynamic libraries and links the installed binaries to these
154 libraries.</para>
155
156 <para><command>cd doc; install ...</command>: These commands install the
157 additional package documentation. Optionally, omit any or all of these
158 commands.</para>
159
160 </sect2>
161
162 <sect2 role="configuration">
163 <title>Configuring BIND</title>
164
165 <sect3 id="bind-config">
166 <title>Config files</title>
167
168 <para><filename>named.conf</filename>,
169 <filename>root.hints</filename>,
170 <filename>127.0.0</filename>,
171 <filename>rndc.conf</filename> and
172 <filename>resolv.conf</filename></para>
173
174 <indexterm zone="bind bind-config">
175 <primary sortas="e-etc-named.conf">/etc/named.conf</primary>
176 </indexterm>
177
178 <indexterm zone="bind bind-config">
179 <primary sortas="e-etc-rndc.conf">/etc/rndc.conf</primary>
180 </indexterm>
181
182 <indexterm zone="bind bind-config">
183 <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
184 </indexterm>
185
186 <indexterm zone="bind bind-config">
187 <primary sortas="e-etc-namedb-root.hints">/etc/namedb/root.hints</primary>
188 </indexterm>
189
190 <indexterm zone="bind bind-config">
191 <primary sortas="e-etc-namedb-pz-127.0.0.0">/etc/namedb/pz/127.0.0.0</primary>
192 </indexterm>
193
194 </sect3>
195
196 <sect3>
197 <title>Configuration Information</title>
198
199 <para><application>BIND</application> will be configured to run in a
200 <command>chroot</command> jail as an unprivileged user (<systemitem
201 class="username">named</systemitem>). This configuration is more secure
202 in that a DNS compromise can only affect a few files in the <systemitem
203 class="username">named</systemitem> user's <envar>HOME</envar>
204 directory.</para>
205
206 <para>Create the unprivileged user and group <systemitem
207 class="username">named</systemitem>:</para>
208
209<screen role="root"><userinput>groupadd named &amp;&amp;
210useradd -m -c "BIND Owner" -g named -s /bin/false named</userinput></screen>
211
212 <para>Set up some files, directories and devices needed by
213 <application>BIND</application>:</para>
214
215<screen role="root"><userinput>cd /home/named &amp;&amp;
216mkdir -p dev etc/namedb/slave var/run &amp;&amp;
217mknod /home/named/dev/null c 1 3 &amp;&amp;
218mknod /home/named/dev/random c 1 8 &amp;&amp;
219chmod 666 /home/named/dev/{null,random} &amp;&amp;
220mkdir /home/named/etc/namedb/pz &amp;&amp;
221cp /etc/localtime /home/named/etc</userinput></screen>
222
223 <para>Then, generate a key for use in the <filename>named.conf</filename>
224 and <filename>rdnc.conf</filename> files using the
225 <command>rndc-confgen</command> command:</para>
226
227<screen role="root"><userinput>rndc-confgen -b 512 | grep -m 1 "secret" | cut -d '"' -f 2</userinput></screen>
228
229 <para>Create the <filename>named.conf</filename> file from which
230 <command>named</command> will read the location of zone files, root
231 name servers and secure DNS keys:</para>
232
233<screen role="root"><userinput>cat &gt; /home/named/etc/named.conf &lt;&lt; "EOF"
234<literal> options {
235 directory "/etc/namedb";
236 pid-file "/var/run/named.pid";
237 statistics-file "/var/run/named.stats";
238
239 };
240 controls {
241 inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
242 };
243 key "rndc_key" {
244 algorithm hmac-md5;
245 secret "<replaceable>[Insert secret from rndc-confgen's output here]</replaceable>";
246 };
247 zone "." {
248 type hint;
249 file "root.hints";
250 };
251 zone "0.0.127.in-addr.arpa" {
252 type master;
253 file "pz/127.0.0";
254 };
255
256// Bind 9 now logs by default through syslog (except debug).
257// These are the default logging rules.
258
259logging {
260 category default { default_syslog; default_debug; };
261 category unmatched { null; };
262
263 channel default_syslog {
264 syslog daemon; // send to syslog's daemon
265 // facility
266 severity info; // only send priority info
267 // and higher
268 };
269
270 channel default_debug {
271 file "named.run"; // write to named.run in
272 // the working directory
273 // Note: stderr is used instead
274 // of "named.run"
275 // if the server is started
276 // with the '-f' option.
277 severity dynamic; // log at the server's
278 // current debug level
279 };
280
281 channel default_stderr {
282 stderr; // writes to stderr
283 severity info; // only send priority info
284 // and higher
285 };
286
287 channel null {
288 null; // toss anything sent to
289 // this channel
290 };
291};</literal>
292
293EOF</userinput></screen>
294
295 <para>Create the <filename>rndc.conf</filename> file with the following
296 commands:</para>
297
298<screen role="root"><userinput>cat &gt; /etc/rndc.conf &lt;&lt; "EOF"
299<literal>key rndc_key {
300algorithm "hmac-md5";
301 secret
302 "<replaceable>[Insert secret from rndc-confgen's output here]</replaceable>";
303 };
304options {
305 default-server localhost;
306 default-key rndc_key;
307};</literal>
308EOF</userinput></screen>
309
310 <para>The <filename>rndc.conf</filename> file contains information for
311 controlling <command>named</command> operations with the
312 <command>rndc</command> utility.</para>
313
314 <para>Create a zone file with the following contents:</para>
315
316<screen role="root"><userinput>cat &gt; /home/named/etc/namedb/pz/127.0.0 &lt;&lt; "EOF"
317<literal>$TTL 3D
318@ IN SOA ns.local.domain. hostmaster.local.domain. (
319 1 ; Serial
320 8H ; Refresh
321 2H ; Retry
322 4W ; Expire
323 1D) ; Minimum TTL
324 NS ns.local.domain.
3251 PTR localhost.</literal>
326EOF</userinput></screen>
327
328 <para>Create the <filename>root.hints</filename> file with the following
329 commands:</para>
330
331 <note>
332 <para>Caution must be used to ensure there are no leading spaces in
333 this file.</para>
334 </note>
335
336<screen role="root"><userinput>cat &gt; /home/named/etc/namedb/root.hints &lt;&lt; "EOF"
337<literal>. 6D IN NS A.ROOT-SERVERS.NET.
338. 6D IN NS B.ROOT-SERVERS.NET.
339. 6D IN NS C.ROOT-SERVERS.NET.
340. 6D IN NS D.ROOT-SERVERS.NET.
341. 6D IN NS E.ROOT-SERVERS.NET.
342. 6D IN NS F.ROOT-SERVERS.NET.
343. 6D IN NS G.ROOT-SERVERS.NET.
344. 6D IN NS H.ROOT-SERVERS.NET.
345. 6D IN NS I.ROOT-SERVERS.NET.
346. 6D IN NS J.ROOT-SERVERS.NET.
347. 6D IN NS K.ROOT-SERVERS.NET.
348. 6D IN NS L.ROOT-SERVERS.NET.
349. 6D IN NS M.ROOT-SERVERS.NET.
350A.ROOT-SERVERS.NET. 6D IN A 198.41.0.4
351B.ROOT-SERVERS.NET. 6D IN A 192.228.79.201
352C.ROOT-SERVERS.NET. 6D IN A 192.33.4.12
353D.ROOT-SERVERS.NET. 6D IN A 128.8.10.90
354E.ROOT-SERVERS.NET. 6D IN A 192.203.230.10
355F.ROOT-SERVERS.NET. 6D IN A 192.5.5.241
356G.ROOT-SERVERS.NET. 6D IN A 192.112.36.4
357H.ROOT-SERVERS.NET. 6D IN A 128.63.2.53
358I.ROOT-SERVERS.NET. 6D IN A 192.36.148.17
359J.ROOT-SERVERS.NET. 6D IN A 192.58.128.30
360K.ROOT-SERVERS.NET. 6D IN A 193.0.14.129
361L.ROOT-SERVERS.NET. 6D IN A 198.32.64.12
362M.ROOT-SERVERS.NET. 6D IN A 202.12.27.33</literal>
363EOF</userinput></screen>
364
365 <para>The <filename>root.hints</filename> file is a list of root
366 name servers. This file must be updated periodically with the
367 <command>dig</command> utility. A current copy of root.hints can be
368 obtained from <ulink url="ftp://rs.internic.net/domain/named.root" />.
369 Consult the <ulink url="http://www.bind9.net/Bv9ARM.html">BIND 9
370 Administrator Reference Manual</ulink> for details.</para>
371
372 <para>Create or modify <filename>resolv.conf</filename> to use the new
373 name server with the following commands:</para>
374
375 <note>
376 <para>Replace <replaceable>[yourdomain.com]</replaceable> with
377 your own valid domain name.</para>
378 </note>
379
380<screen role="root"><userinput>cp /etc/resolv.conf /etc/resolv.conf.bak &amp;&amp;
381cat &gt; /etc/resolv.conf &lt;&lt; "EOF"
382<literal>search <replaceable>[yourdomain.com]</replaceable>
383nameserver 127.0.0.1</literal>
384EOF</userinput></screen>
385
386 <para>Set permissions on the <command>chroot</command> jail with the
387 following command:</para>
388
389<screen role="root"><userinput>chown -R named.named /home/named</userinput></screen>
390
391 </sect3>
392
393 <sect3 id="bind-init">
394 <title>Boot Script</title>
395
396 <para>To start the DNS server at boot, install the
397 <filename>/etc/rc.d/init.d/bind</filename> init script included
398 in the <xref linkend="intro-important-bootscripts"/> package.</para>
399
400 <indexterm zone="bind bind-init">
401 <primary sortas="f-bind">bind</primary>
402 </indexterm>
403
404<screen role="root"><userinput>make install-bind</userinput></screen>
405
406 <para>Now start <application>BIND</application> with
407 the new boot script:</para>
408
409<screen role="root"><userinput>/etc/rc.d/init.d/bind start</userinput></screen>
410
411 </sect3>
412
413 <sect3>
414 <title>Testing BIND</title>
415
416 <para>Test out the new <application>BIND</application> 9 installation.
417 First query the local host address with <command>dig</command>:</para>
418
419<screen><userinput>dig -x 127.0.0.1</userinput></screen>
420
421 <para>Now try an external name lookup, taking note of the speed
422 difference in repeated lookups due to the caching. Run the
423 <command>dig</command> command twice on the same address:</para>
424
425<screen><userinput>dig www.linuxfromscratch.org &amp;&amp;
426dig www.linuxfromscratch.org</userinput></screen>
427
428 <para>You can see almost instantaneous results with the named caching
429 lookups. Consult the <application>BIND</application> Administrator
430 Reference Manual located at <filename>doc/arm/Bv9ARM.html</filename>
431 in the package source tree, for further configuration options.</para>
432
433 </sect3>
434
435 </sect2>
436
437 <sect2 role="content">
438 <title>Contents</title>
439
440 <segmentedlist>
441 <segtitle>Installed Programs</segtitle>
442 <segtitle>Installed Libraries</segtitle>
443 <segtitle>Installed Directories</segtitle>
444
445 <seglistitem>
446 <seg>dig, dnssec-keygen, dnssec-signzone, host, isc-config.sh, lwresd,
447 named, named-checkconf, named-checkzone, nslookup, nsupdate, rndc, and
448 rndc-confgen</seg>
449 <seg>libbind9.[so,a], libdns.[so,a], libisc.[so,a], libisccc.[so,a],
450 libisccfg.[so,a], and liblwres.[so,a]</seg>
451 <seg>/home/named, /usr/include/bind9, /usr/include/dns, /usr/include/dst,
452 /usr/include/isc, /usr/include/isccc, /usr/include/isccfg,
453 /usr/include/lwres, and /usr/share/doc/bind-&bind-version;</seg>
454 </seglistitem>
455 </segmentedlist>
456
457 <variablelist>
458 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
459 <?dbfo list-presentation="list"?>
460 <?dbhtml list-presentation="table"?>
461
462 <varlistentry id="dig">
463 <term><command>dig</command></term>
464 <listitem>
465 <para>interrogates DNS servers.</para>
466 <indexterm zone="bind dig">
467 <primary sortas="b-dig">dig</primary>
468 </indexterm>
469 </listitem>
470 </varlistentry>
471
472 <varlistentry id="dnssec-keygen">
473 <term><command>dnssec-keygen</command></term>
474 <listitem>
475 <para>is a key generator for secure DNS.</para>
476 <indexterm zone="bind dnssec-keygen">
477 <primary sortas="b-dnssec-keygen">dnssec-keygen</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
481
482 <varlistentry id="dnssec-signzone">
483 <term><command>dnssec-signzone</command></term>
484 <listitem>
485 <para>generates signed versions of zone files.</para>
486 <indexterm zone="bind dnssec-signzone">
487 <primary sortas="b-dnssec-signzone">dnssec-signzone</primary>
488 </indexterm>
489 </listitem>
490 </varlistentry>
491
492 <varlistentry id="host">
493 <term><command>host</command></term>
494 <listitem>
495 <para>is a utility for DNS lookups.</para>
496 <indexterm zone="bind host">
497 <primary sortas="b-host">host</primary>
498 </indexterm>
499 </listitem>
500 </varlistentry>
501
502 <varlistentry id="lwresd">
503 <term><command>lwresd</command></term>
504 <listitem>
505 <para>is a caching-only name server for local process use.</para>
506 <indexterm zone="bind lwresd">
507 <primary sortas="b-lwresd">lwresd</primary>
508 </indexterm>
509 </listitem>
510 </varlistentry>
511
512 <varlistentry id="named">
513 <term><command>named</command></term>
514 <listitem>
515 <para>is the name server daemon.</para>
516 <indexterm zone="bind named">
517 <primary sortas="b-named">named</primary>
518 </indexterm>
519 </listitem>
520 </varlistentry>
521
522 <varlistentry id="named-checkconf">
523 <term><command>named-checkconf</command></term>
524 <listitem>
525 <para>checks the syntax of <filename>named.conf</filename>
526 files.</para>
527 <indexterm zone="bind named-checkconf">
528 <primary sortas="b-named-checkconf">named-checkconf</primary>
529 </indexterm>
530 </listitem>
531 </varlistentry>
532
533 <varlistentry id="named-checkzone">
534 <term><command>named-checkzone</command></term>
535 <listitem>
536 <para>checks zone file validity.</para>
537 <indexterm zone="bind named-checkzone">
538 <primary sortas="b-named-checkzone">named-checkzone</primary>
539 </indexterm>
540 </listitem>
541 </varlistentry>
542
543 <varlistentry id="nslookup">
544 <term><command>nslookup</command></term>
545 <listitem>
546 <para>is a program used to query Internet domain nameservers.</para>
547 <indexterm zone="bind nslookup">
548 <primary sortas="b-nslookup">nslookup</primary>
549 </indexterm>
550 </listitem>
551 </varlistentry>
552
553 <varlistentry id="nsupdate">
554 <term><command>nsupdate</command></term>
555 <listitem>
556 <para>is used to submit DNS update requests.</para>
557 <indexterm zone="bind nsupdate">
558 <primary sortas="b-nsupdate">nsupdate</primary>
559 </indexterm>
560 </listitem>
561 </varlistentry>
562
563 <varlistentry id="rndc">
564 <term><command>rndc</command></term>
565 <listitem>
566 <para>controls the operation of <application>BIND</application>.</para>
567 <indexterm zone="bind rndc">
568 <primary sortas="b-rndc">rndc</primary>
569 </indexterm>
570 </listitem>
571 </varlistentry>
572
573 <varlistentry id="rndc-confgen">
574 <term><command>rndc-confgen</command></term>
575 <listitem>
576 <para>generates <filename>rndc.conf</filename> files.</para>
577 <indexterm zone="bind rndc-confgen">
578 <primary sortas="b-rndc-confgen">rndc-confgen</primary>
579 </indexterm>
580 </listitem>
581 </varlistentry>
582
583 </variablelist>
584
585 </sect2>
586
587</sect1>
Note: See TracBrowser for help on using the repository browser.