source: server/other/bind.xml@ a2fe8d47

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 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 a2fe8d47 was a2fe8d47, checked in by Randy McMurchy <randy@…>, 19 years ago

Added patch from ISC to fix a vulnerability issue and bumped version entities to 9.3.0p1 in Bind instructions

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

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