source: server/other/bind.xml@ ff769b8c

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 ff769b8c was ff769b8c, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Updated the XML sources to use DocBook XML DTD-4.4.

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

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