source: server/other/bind.xml@ 802e6fe7

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 802e6fe7 was 4008b19, checked in by Igor Živković <igor@…>, 20 years ago

Added Berkeley DB and JadeTeX to BIND dependencies.

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

  • Property mode set to 100644
File size: 12.0 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.4 MB">
10<!ENTITY bind-buildsize "88 MB">
11<!ENTITY bind-time "0.89 SBU">
12
13]>
14
15<sect1 id="bind" xreflabel="BIND-&bind-version;">
16<?dbhtml filename="bind.html"?>
17<title><acronym>BIND</acronym>-&bind-version;</title>
18
19<sect2>
20<title>Introduction to <application><acronym>BIND</acronym></application></title>
21
22<para>The <application><acronym>BIND</acronym></application> package
23provides a <acronym>DNS</acronym> server and client utilities. If you
24are only interested in the utilities, refer to the <xref linkend="bind-utils"/>.</para>
25
26<sect3><title>Package information</title>
27<itemizedlist spacing='compact'>
28<listitem><para>Download (HTTP): <ulink url="&bind-download-http;"/></para></listitem>
29<listitem><para>Download (FTP): <ulink url="&bind-download-ftp;"/></para></listitem>
30<listitem><para>Download size: &bind-size;</para></listitem>
31<listitem><para>Estimated Disk space required: &bind-buildsize;</para></listitem>
32<listitem><para>Estimated build time: &bind-time;</para></listitem></itemizedlist>
33</sect3>
34
35<sect3><title><application><acronym>BIND</acronym></application> dependencies</title>
36<sect4><title>Optional</title>
37<para>
38<xref linkend="openssl"/>,
39<xref linkend="db"/>,
40<xref linkend="openjade"/> and
41<xref linkend="jadetex"/>
42</para></sect4>
43</sect3>
44
45</sect2>
46
47<sect2>
48<title>Installation of <application><acronym>BIND</acronym></application></title>
49
50<para>Install <application><acronym>BIND</acronym></application> by
51running the following commands:</para>
52
53<screen><userinput><command>./configure --prefix=/usr --sysconfdir=/etc &amp;&amp;
54make &amp;&amp;
55make install</command></userinput></screen>
56
57</sect2>
58
59<sect2>
60<title>Configuring
61<application><acronym>BIND</acronym></application></title>
62
63<sect3><title>Config files</title>
64<para><filename>named.conf</filename>, <filename>root.hints</filename>,
65<filename>127.0.0</filename>, <filename>rndc.conf</filename></para>
66</sect3>
67
68<sect3><title>Configuration Information</title>
69
70<para>We will configure
71<application><acronym>BIND</acronym></application> to run in a chroot
72jail as an unprivileged user (named). This configuration is more secure
73in that a <acronym>DNS</acronym> compromise can only affect a few files
74in the named user's <envar>HOME</envar> directory.</para>
75
76<para>First we create the unprivileged user and group named:</para>
77
78<screen><userinput><command>groupadd named &amp;&amp;
79useradd -m -g named -s /bin/false named</command></userinput></screen>
80
81<para>Then we set up some files, directories and devices needed by
82<application><acronym>BIND</acronym></application>:</para>
83
84<screen><userinput><command>cd /home/named &amp;&amp;
85mkdir -p dev etc/namedb/slave var/run &amp;&amp;
86mknod /home/named/dev/null c 1 3 &amp;&amp;
87mknod /home/named/dev/random c 1 8 &amp;&amp;
88chmod 666 /home/named/dev/{null,random} &amp;&amp;
89mkdir /home/named/etc/namedb/pz &amp;&amp;
90cp /etc/localtime /home/named/etc</command></userinput></screen>
91
92<para>Create the <filename>named.conf</filename> file from which named
93will read the location of zone files, root name servers and secure
94<acronym>DNS</acronym> keys:</para>
95
96<screen><userinput><command>cat &gt; /home/named/etc/named.conf &lt;&lt; "EOF"</command>
97 options {
98 directory "/etc/namedb";
99 pid-file "/var/run/named.pid";
100 statistics-file "/var/run/named.stats";
101
102 };
103 controls {
104 inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
105 };
106 key "rndc_key" {
107 algorithm hmac-md5;
108 secret "<replaceable>[c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K]</replaceable>";
109 };
110 zone "." {
111 type hint;
112 file "root.hints";
113 };
114 zone "0.0.127.in-addr.arpa" {
115 type master;
116 file "pz/127.0.0";
117 };
118<command>EOF</command></userinput></screen>
119
120<para>Create a zone file with the following contents:</para>
121
122<screen><userinput><command>cat &gt; /home/named/etc/namedb/pz/127.0.0 &lt;&lt; "EOF"</command>
123$TTL 3D
124@ IN SOA ns.local.domain. hostmaster.local.domain. (
125 1 ; Serial
126 8H ; Refresh
127 2H ; Retry
128 4W ; Expire
129 1D) ; Minimum TTL
130 NS ns.local.domain.
1311 PTR localhost.
132<command>EOF</command></userinput></screen>
133
134<para>Create the <filename>root.hints</filename> file with the following
135commands:</para>
136
137<note><para>Caution must be used to ensure no leading spaces in this
138file.</para></note>
139
140<screen><userinput><command>cat &gt; /home/named/etc/namedb/root.hints &lt;&lt; "EOF"</command>
141. 6D IN NS A.ROOT-SERVERS.NET.
142. 6D IN NS B.ROOT-SERVERS.NET.
143. 6D IN NS C.ROOT-SERVERS.NET.
144. 6D IN NS D.ROOT-SERVERS.NET.
145. 6D IN NS E.ROOT-SERVERS.NET.
146. 6D IN NS F.ROOT-SERVERS.NET.
147. 6D IN NS G.ROOT-SERVERS.NET.
148. 6D IN NS H.ROOT-SERVERS.NET.
149. 6D IN NS I.ROOT-SERVERS.NET.
150. 6D IN NS J.ROOT-SERVERS.NET.
151. 6D IN NS K.ROOT-SERVERS.NET.
152. 6D IN NS L.ROOT-SERVERS.NET.
153. 6D IN NS M.ROOT-SERVERS.NET.
154A.ROOT-SERVERS.NET. 6D IN A 198.41.0.4
155B.ROOT-SERVERS.NET. 6D IN A 128.9.0.107
156C.ROOT-SERVERS.NET. 6D IN A 192.33.4.12
157D.ROOT-SERVERS.NET. 6D IN A 128.8.10.90
158E.ROOT-SERVERS.NET. 6D IN A 192.203.230.10
159F.ROOT-SERVERS.NET. 6D IN A 192.5.5.241
160G.ROOT-SERVERS.NET. 6D IN A 192.112.36.4
161H.ROOT-SERVERS.NET. 6D IN A 128.63.2.53
162I.ROOT-SERVERS.NET. 6D IN A 192.36.148.17
163J.ROOT-SERVERS.NET. 6D IN A 192.58.128.30
164K.ROOT-SERVERS.NET. 6D IN A 193.0.14.129
165L.ROOT-SERVERS.NET. 6D IN A 198.32.64.12
166M.ROOT-SERVERS.NET. 6D IN A 202.12.27.33
167<command>EOF</command></userinput></screen>
168
169<para>The <filename>root.hints</filename> file is a list of root name
170servers. This file must be updated periodically with the
171<command>dig</command> utility.
172Consult the <ulink url="http://www.bind9.net/Bv9ARM.html"><application><acronym>BIND</acronym></application> 9 Administrator Reference Manual</ulink> for
173details.</para>
174
175<para>Create the <filename>rndc.conf</filename> with the following commands:</para>
176
177<screen><userinput><command>cat &gt; /etc/rndc.conf &lt;&lt; "EOF"</command>
178key rndc_key {
179algorithm "hmac-md5";
180 secret
181 "<replaceable>[c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K]</replaceable>";
182 };
183options {
184 default-server localhost;
185 default-key rndc_key;
186};
187<command>EOF</command></userinput></screen>
188
189<para>The <filename>rndc.conf</filename> file contains information for
190controlling named operations with the <command>rndc</command>
191utility.</para>
192
193<para>Create or modify <filename>resolv.conf</filename> to use the new
194name server with the following commands:</para>
195
196<note><para>Replace yourdomain.com with your own valid domain
197name.</para></note>
198
199<screen><userinput><command>cp /etc/resolv.conf /etc/resolv.conf.bak &amp;&amp;
200cat &gt; /etc/resolv.conf &lt;&lt; "EOF"</command>
201search <replaceable>[yourdomain.com]</replaceable>
202nameserver 127.0.0.1
203<command>EOF</command></userinput></screen>
204
205<para>Set permissions on the chroot jail with the following
206command:</para>
207
208<screen><userinput><command>chown -R named.named /home/named</command></userinput></screen>
209
210<para>To start the DNS server at boot, install the <filename>/etc/rc.d/init.d/bind</filename>
211init script included in the <xref linkend="intro-important-bootscripts"/> package.</para>
212
213<screen><userinput><command>make install-bind</command></userinput></screen>
214
215<para>Now start <application><acronym>BIND</acronym></application> with
216the new boot script:</para>
217
218<screen><userinput><command>/etc/rc.d/init.d/bind start</command></userinput></screen>
219
220</sect3>
221
222<sect3><title>Testing <application><acronym>BIND</acronym></application></title>
223
224<para>Test out the new
225<application><acronym>BIND</acronym></application> 9 installation. First
226query the local host address with <command>dig</command>:</para>
227
228<screen><userinput><command>dig -x 127.0.0.1</command></userinput></screen>
229
230<para>Now try an external name lookup, taking note of the speed
231difference in repeated lookups due to the caching. Run the dig command
232twice on the same address:</para>
233
234<para><screen><userinput><command>dig beyond.linuxfromscratch.org &amp;&amp;
235dig beyond.linuxfromscratch.org</command></userinput></screen>
236You can see almost instantaneous results with the named caching lookups.
237Consult <filename>bind-&bind-version;/doc/arm/Bv9ARM.html</filename>,
238the <application><acronym>BIND</acronym></application> Administrator
239Reference Manual for further configuration options.</para>
240
241</sect3>
242
243</sect2>
244
245<sect2>
246<title>Contents</title>
247
248<para>The <application><acronym>BIND</acronym></application> package contains
249<command>dig</command>,
250<command>host</command>,
251<command>isc-config.sh</command>,
252<command>nslookup</command>,
253<command>rndc</command>,
254<command>rndc-confgen</command>,
255<command>named-checkconf</command>,
256<command>named-checkzone</command>,
257<command>lwresd</command>,
258<command>named</command>,
259<command>dnssec-signzone</command>,
260<command>dnssec-signkey</command>,
261<command>dnssec-keygen</command>,
262<command>dnssec-makekeyset</command> and
263<command>nsupdate</command>.</para>
264</sect2>
265
266<sect2><title>Description</title>
267
268<sect3><title>dig</title>
269<para><command>dig</command> interrogates <acronym>DNS</acronym>
270servers.</para></sect3>
271
272<sect3><title>host</title>
273<para><command>host</command> is a utility for <acronym>DNS</acronym>
274lookups.</para></sect3>
275
276<sect3><title>nslookup</title>
277<para><command>nslookup</command> is a program used to query Internet
278domain nameservers.</para></sect3>
279
280<sect3><title>rndc</title>
281<para><command>rndc</command> controls the operation of
282<application><acronym>BIND</acronym></application>.</para></sect3>
283
284<sect3><title>rndc-confgen</title>
285<para><command>rndc-confgen</command> generates
286<filename>rndc.conf</filename> files.</para></sect3>
287
288<sect3><title>named-checkconf</title>
289<para><command>named-checkconf</command> checks the syntax of
290<filename>named.conf</filename> files.</para></sect3>
291
292<sect3><title>named-checkzone</title>
293<para><command>named-checkzone</command> checks zone file
294validity.</para></sect3>
295
296<sect3><title>lwresd</title>
297<para><command>lwresd</command> is a caching-only name server for local
298process use.</para></sect3>
299
300<sect3><title>named</title>
301<para><command>named</command> is the name server daemon.</para></sect3>
302
303<sect3><title>dnssec-signzone</title>
304<para><command>dnssec-signzone</command> generates signed versions of
305zone files.</para></sect3>
306
307<sect3><title>dnssec-signkey</title>
308<para><command>dnssec-signkey</command> signs zone file key
309sets.</para></sect3>
310
311<sect3><title>dnssec-keygen</title>
312<para><command>dnssec-keygen</command> is a key generator for secure
313<acronym>DNS</acronym>.</para></sect3>
314
315<sect3><title>dnssec-makekeyset</title>
316<para><command>dnssec-makekeyset</command> generates a key set from one
317or more keys created by dnssec-keygen.</para></sect3>
318
319<sect3><title>nsupdate</title>
320<para><command>nsupdate</command> is used to submit
321<acronym>DNS</acronym> update requests.</para></sect3>
322
323</sect2>
324
325</sect1>
326
Note: See TracBrowser for help on using the repository browser.