1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY bind-download-http " ">
|
---|
8 | <!ENTITY bind-download-ftp "ftp://ftp.isc.org/isc/bind9/&bind-version;/bind-&bind-version;.tar.gz">
|
---|
9 | <!ENTITY bind-md5sum "59ea48bfeb50d5f4df315c5bf7df029e">
|
---|
10 | <!ENTITY bind-size "6.0 MB">
|
---|
11 | <!ENTITY bind-buildsize "122 MB (24 MB installed; add 7 MB for tests)">
|
---|
12 | <!ENTITY bind-time "1.0 SBU (with parallelism=4; add 30+ minutes, processor independent, to run the complete test suite)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="bind" xreflabel="BIND-&bind-version;">
|
---|
16 | <?dbhtml filename="bind.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>BIND-&bind-version;</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 | &lfs84_checked;
|
---|
37 |
|
---|
38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
39 | <itemizedlist spacing="compact">
|
---|
40 | <listitem>
|
---|
41 | <para>Download (HTTP): <ulink url="&bind-download-http;"/></para>
|
---|
42 | </listitem>
|
---|
43 | <listitem>
|
---|
44 | <para>Download (FTP): <ulink url="&bind-download-ftp;"/></para>
|
---|
45 | </listitem>
|
---|
46 | <listitem>
|
---|
47 | <para>Download MD5 sum: &bind-md5sum;</para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>Download size: &bind-size;</para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>Estimated disk space required: &bind-buildsize;</para>
|
---|
54 | </listitem>
|
---|
55 | <listitem>
|
---|
56 | <para>Estimated build time: &bind-time;</para>
|
---|
57 | </listitem>
|
---|
58 | </itemizedlist>
|
---|
59 | <!--
|
---|
60 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
61 | <itemizedlist spacing='compact'>
|
---|
62 | <listitem>
|
---|
63 | <para>Optional patch (if net-tools is not installed):
|
---|
64 | <ulink
|
---|
65 | url="&patch-root;/bind-&bind-version;-use_iproute2-1.patch"/></para>
|
---|
66 | </listitem>
|
---|
67 | </itemizedlist>
|
---|
68 | -->
|
---|
69 | <bridgehead renderas="sect3">BIND Dependencies</bridgehead>
|
---|
70 |
|
---|
71 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
72 | <para role="optional">
|
---|
73 | <xref linkend="libcap-pam"/>
|
---|
74 | </para>
|
---|
75 |
|
---|
76 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
77 | <para role="optional">
|
---|
78 | <xref linkend="libidn2"/>,
|
---|
79 | <xref linkend="libxml2"/>,
|
---|
80 | <xref linkend="mitkrb"/>, and
|
---|
81 | <ulink url='https://github.com/cjheath/geoip'>geoip</ulink>
|
---|
82 | </para>
|
---|
83 |
|
---|
84 | <bridgehead renderas="sect4">Optional database backends</bridgehead>
|
---|
85 | <para role="optional">
|
---|
86 | <xref linkend="db"/>,
|
---|
87 | <xref linkend="mariadb"/> or <ulink url="http://www.mysql.com/">MySQL</ulink>,
|
---|
88 | <xref linkend="openldap"/>,
|
---|
89 | <xref linkend="postgresql"/>, and
|
---|
90 | <xref linkend="unixodbc"/>
|
---|
91 | </para>
|
---|
92 |
|
---|
93 | <bridgehead renderas="sect4">Optional (to run the test suite)</bridgehead>
|
---|
94 | <para role="optional">
|
---|
95 | <xref linkend="perl-net-dns"/>
|
---|
96 | <!-- and
|
---|
97 | <xref linkend="net-tools"/> (you may omit net-tools by using the optional
|
---|
98 | patch to utilize iproute2, but the IPv6 tests will fail)
|
---|
99 | -->
|
---|
100 | </para>
|
---|
101 |
|
---|
102 | <bridgehead renderas="sect4">Optional (to rebuild the documentation)</bridgehead>
|
---|
103 | <para role="optional">
|
---|
104 | <xref linkend="doxygen"/>,
|
---|
105 | <xref linkend="libxslt"/>, and
|
---|
106 | <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>)
|
---|
107 | </para>
|
---|
108 |
|
---|
109 | <para condition="html" role="usernotes">User Notes:
|
---|
110 | <ulink url="&blfs-wiki;/bind"/></para>
|
---|
111 |
|
---|
112 | </sect2>
|
---|
113 |
|
---|
114 | <sect2 role="installation">
|
---|
115 | <title>Installation of BIND</title>
|
---|
116 | <!--
|
---|
117 | <para>If you have chosen not to install net-tools, apply the iproute2
|
---|
118 | patch with the following command:</para>
|
---|
119 |
|
---|
120 | <screen><userinput>patch -Np1 -i ../bind-&bind-version;-use_iproute2-1.patch</userinput></screen>
|
---|
121 | -->
|
---|
122 |
|
---|
123 | <para>To ensure <application>BIND</application> will build dnssec-keymgr,
|
---|
124 | install a python module as the <systemitem
|
---|
125 | class="username">root</systemitem> user:</para>
|
---|
126 |
|
---|
127 | <screen><userinput>pip3 install ply</userinput></screen>
|
---|
128 |
|
---|
129 | <para>Install <application>BIND</application> by running the
|
---|
130 | following commands:</para>
|
---|
131 |
|
---|
132 | <screen><userinput>./configure --prefix=/usr \
|
---|
133 | --sysconfdir=/etc \
|
---|
134 | --localstatedir=/var \
|
---|
135 | --mandir=/usr/share/man \
|
---|
136 | --enable-threads \
|
---|
137 | --with-libtool \
|
---|
138 | --disable-static &&
|
---|
139 | make</userinput></screen>
|
---|
140 |
|
---|
141 | <para>Issue the following commands to run the complete suite of tests.
|
---|
142 | First, as the <systemitem class="username">root</systemitem> user, set up
|
---|
143 | some test interfaces:</para>
|
---|
144 |
|
---|
145 | <note><para>If IPv6 is not enabled in the kernel, there will be several
|
---|
146 | error messages: "RTNETLINK answers: Operation not permitted". These
|
---|
147 | messages do not affect the tests.</para></note>
|
---|
148 |
|
---|
149 | <screen role="root"><userinput>bin/tests/system/ifconfig.sh up</userinput></screen>
|
---|
150 |
|
---|
151 | <para>The test suite may indicate some skipped tests depending on
|
---|
152 | what configuration options are used. Some tests are marked <quote>UNTESTED
|
---|
153 | </quote> if <xref linkend="perl-net-dns"/> is not installed.
|
---|
154 | To run the tests, as an unprivileged user, execute:</para>
|
---|
155 |
|
---|
156 | <screen><userinput>make -k check</userinput></screen>
|
---|
157 |
|
---|
158 | <para>Again as <systemitem class="username">root</systemitem>, clean up the
|
---|
159 | test interfaces:</para>
|
---|
160 |
|
---|
161 | <screen role="root"><userinput>bin/tests/system/ifconfig.sh down</userinput></screen>
|
---|
162 |
|
---|
163 | <para>Finally, install the package as the <systemitem
|
---|
164 | class="username">root</systemitem> user:</para>
|
---|
165 |
|
---|
166 | <screen role="root"><userinput>make install &&
|
---|
167 |
|
---|
168 | install -v -m755 -d /usr/share/doc/bind-&bind-version;/arm &&
|
---|
169 | install -v -m644 doc/arm/*.html \
|
---|
170 | /usr/share/doc/bind-&bind-version;/arm</userinput></screen>
|
---|
171 | </sect2>
|
---|
172 |
|
---|
173 | <!-- Documentation is an issue - make doc fails - some docbook problem
|
---|
174 | install -v -m644 doc/misc/{dnssec,ipv6,migrat*,options,rfc-compliance,roadmap,sdb} \
|
---|
175 | /usr/share/doc/bind-&bind-version;/misc</userinput></screen>
|
---|
176 | -->
|
---|
177 |
|
---|
178 | <sect2 role="commands">
|
---|
179 | <title>Command Explanations</title>
|
---|
180 |
|
---|
181 | <para><parameter>--sysconfdir=/etc</parameter>: This parameter forces
|
---|
182 | <application>BIND</application> to look for configuration
|
---|
183 | files in <filename class='directory'>/etc</filename> instead of
|
---|
184 | <filename class='directory'>/usr/etc</filename>.</para>
|
---|
185 |
|
---|
186 | <para><parameter>--enable-threads</parameter>: This parameter enables
|
---|
187 | multi-threading capability.</para>
|
---|
188 |
|
---|
189 | <para><parameter>--with-libtool</parameter>: This parameter forces the
|
---|
190 | building of dynamic libraries and links the installed binaries to these
|
---|
191 | libraries.</para>
|
---|
192 |
|
---|
193 | <para><parameter>--with-libidn2</parameter>: This parameter enables
|
---|
194 | the IDNA2008 (Internationalized Domain Names in Applications)
|
---|
195 | support.</para>
|
---|
196 |
|
---|
197 | <!-- no longer available
|
---|
198 | <para><parameter>- -with-randomdev=/dev/urandom</parameter>: This parameter
|
---|
199 | specifes a non-blocking random device for use with digital signatures.</para>
|
---|
200 | -->
|
---|
201 | <para><option>--enable-fetchlimit</option>: Use this option if you want
|
---|
202 | to be able to limit the rate of recursive client queries. This may be
|
---|
203 | useful on servers which receive a large number of queries.</para>
|
---|
204 |
|
---|
205 | <para><option>--disable-linux-caps</option>BIND can also be built without
|
---|
206 | capability support by using this option, at the cost of some loss of
|
---|
207 | security.</para>
|
---|
208 |
|
---|
209 | <para><option>--with-dlz-{mysql,bdb,filesystem,ldap,odbc,stub}</option>: Use
|
---|
210 | one (or more) of those options to add Dynamically Loadable Zones support.
|
---|
211 | For more information refer to
|
---|
212 | <ulink url="http://bind-dlz.sourceforge.net/">bind-dlz.sourceforge.net</ulink>.
|
---|
213 | </para>
|
---|
214 |
|
---|
215 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
216 | href="../../xincludes/static-libraries.xml"/>
|
---|
217 |
|
---|
218 | <para><command>cd doc; install ...</command>: These commands install
|
---|
219 | additional package documentation. Omit any or all of these commands if
|
---|
220 | desired.</para>
|
---|
221 | </sect2>
|
---|
222 |
|
---|
223 | <sect2 role="configuration">
|
---|
224 | <title>Configuring BIND</title>
|
---|
225 |
|
---|
226 | <sect3 id="bind-config">
|
---|
227 | <title>Config files</title>
|
---|
228 |
|
---|
229 | <para><filename>named.conf</filename>,
|
---|
230 | <filename>root.hints</filename>,
|
---|
231 | <filename>127.0.0</filename>,
|
---|
232 | <filename>rndc.conf</filename> and
|
---|
233 | <filename>resolv.conf</filename></para>
|
---|
234 |
|
---|
235 | <indexterm zone="bind bind-config">
|
---|
236 | <primary sortas="e-etc-named.conf">/etc/named.conf</primary>
|
---|
237 | </indexterm>
|
---|
238 |
|
---|
239 | <indexterm zone="bind bind-config">
|
---|
240 | <primary sortas="e-etc-rndc.conf">/etc/rndc.conf</primary>
|
---|
241 | </indexterm>
|
---|
242 |
|
---|
243 | <indexterm zone="bind bind-config">
|
---|
244 | <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
|
---|
245 | </indexterm>
|
---|
246 |
|
---|
247 | <indexterm zone="bind bind-config">
|
---|
248 | <primary
|
---|
249 | sortas="e-etc-namedb-root.hints">/etc/namedb/root.hints</primary>
|
---|
250 | </indexterm>
|
---|
251 |
|
---|
252 | <indexterm zone="bind bind-config">
|
---|
253 | <primary
|
---|
254 | sortas="e-etc-namedb-pz-127.0.0.0">/etc/namedb/pz/127.0.0.0</primary>
|
---|
255 | </indexterm>
|
---|
256 | </sect3>
|
---|
257 |
|
---|
258 | <sect3>
|
---|
259 | <title>Configuration Information</title>
|
---|
260 |
|
---|
261 | <para><application>BIND</application> will be configured to run in a
|
---|
262 | <command>chroot</command> jail as an unprivileged user (<systemitem
|
---|
263 | class="username">named</systemitem>). This configuration is more secure
|
---|
264 | in that a DNS compromise can only affect a few files in the <systemitem
|
---|
265 | class="username">named</systemitem> user's <envar>HOME</envar>
|
---|
266 | directory.</para>
|
---|
267 |
|
---|
268 | <para>Create the unprivileged user and group <systemitem
|
---|
269 | class="username">named</systemitem>:</para>
|
---|
270 |
|
---|
271 | <screen role="root"><userinput>groupadd -g 20 named &&
|
---|
272 | useradd -c "BIND Owner" -g named -s /bin/false -u 20 named &&
|
---|
273 | install -d -m770 -o named -g named /srv/named</userinput></screen>
|
---|
274 |
|
---|
275 | <para>Set up some files, directories and devices needed by
|
---|
276 | <application>BIND</application>:</para>
|
---|
277 |
|
---|
278 | <screen role="root"><userinput>mkdir -p /srv/named &&
|
---|
279 | cd /srv/named &&
|
---|
280 | mkdir -p dev etc/namedb/{slave,pz} usr/lib/engines var/run/named &&
|
---|
281 | mknod /srv/named/dev/null c 1 3 &&
|
---|
282 | mknod /srv/named/dev/urandom c 1 9 &&
|
---|
283 | chmod 666 /srv/named/dev/{null,urandom} &&
|
---|
284 | cp /etc/localtime etc &&
|
---|
285 | touch /srv/named/managed-keys.bind</userinput></screen>
|
---|
286 |
|
---|
287 | <para>The <filename>rndc.conf</filename> file contains information for
|
---|
288 | controlling <command>named</command> operations with the
|
---|
289 | <command>rndc</command> utility. Generate a key for use in the <filename>named.conf</filename> and <filename>rdnc.conf</filename> with the
|
---|
290 | <command>rndc-confgen</command> command:</para>
|
---|
291 |
|
---|
292 | <screen role="root"><userinput>rndc-confgen -r /dev/urandom -b 512 > /etc/rndc.conf &&
|
---|
293 | sed '/conf/d;/^#/!d;s:^# ::' /etc/rndc.conf > /srv/named/etc/named.conf</userinput></screen>
|
---|
294 |
|
---|
295 | <para>Complete the <filename>named.conf</filename> file from which
|
---|
296 | <command>named</command> will read the location of zone files, root
|
---|
297 | name servers and secure DNS keys:</para>
|
---|
298 |
|
---|
299 | <screen role="root"><?dbfo keep-together="auto"?><userinput>cat >> /srv/named/etc/named.conf << "EOF"
|
---|
300 | <literal>options {
|
---|
301 | directory "/etc/namedb";
|
---|
302 | pid-file "/var/run/named.pid";
|
---|
303 | statistics-file "/var/run/named.stats";
|
---|
304 |
|
---|
305 | };
|
---|
306 | zone "." {
|
---|
307 | type hint;
|
---|
308 | file "root.hints";
|
---|
309 | };
|
---|
310 | zone "0.0.127.in-addr.arpa" {
|
---|
311 | type master;
|
---|
312 | file "pz/127.0.0";
|
---|
313 | };
|
---|
314 |
|
---|
315 | // Bind 9 now logs by default through syslog (except debug).
|
---|
316 | // These are the default logging rules.
|
---|
317 |
|
---|
318 | logging {
|
---|
319 | category default { default_syslog; default_debug; };
|
---|
320 | category unmatched { null; };
|
---|
321 |
|
---|
322 | channel default_syslog {
|
---|
323 | syslog daemon; // send to syslog's daemon
|
---|
324 | // facility
|
---|
325 | severity info; // only send priority info
|
---|
326 | // and higher
|
---|
327 | };
|
---|
328 |
|
---|
329 | channel default_debug {
|
---|
330 | file "named.run"; // write to named.run in
|
---|
331 | // the working directory
|
---|
332 | // Note: stderr is used instead
|
---|
333 | // of "named.run"
|
---|
334 | // if the server is started
|
---|
335 | // with the '-f' option.
|
---|
336 | severity dynamic; // log at the server's
|
---|
337 | // current debug level
|
---|
338 | };
|
---|
339 |
|
---|
340 | channel default_stderr {
|
---|
341 | stderr; // writes to stderr
|
---|
342 | severity info; // only send priority info
|
---|
343 | // and higher
|
---|
344 | };
|
---|
345 |
|
---|
346 | channel null {
|
---|
347 | null; // toss anything sent to
|
---|
348 | // this channel
|
---|
349 | };
|
---|
350 | };</literal>
|
---|
351 | EOF</userinput></screen>
|
---|
352 |
|
---|
353 | <para>Create a zone file with the following contents:</para>
|
---|
354 |
|
---|
355 | <screen role="root"><userinput>cat > /srv/named/etc/namedb/pz/127.0.0 << "EOF"
|
---|
356 | <literal>$TTL 3D
|
---|
357 | @ IN SOA ns.local.domain. hostmaster.local.domain. (
|
---|
358 | 1 ; Serial
|
---|
359 | 8H ; Refresh
|
---|
360 | 2H ; Retry
|
---|
361 | 4W ; Expire
|
---|
362 | 1D) ; Minimum TTL
|
---|
363 | NS ns.local.domain.
|
---|
364 | 1 PTR localhost.</literal>
|
---|
365 | EOF</userinput></screen>
|
---|
366 |
|
---|
367 | <para>Create the <filename>root.hints</filename> file with the following
|
---|
368 | commands:</para>
|
---|
369 |
|
---|
370 | <note>
|
---|
371 | <para>Caution must be used to ensure there are no leading spaces in
|
---|
372 | this file.</para>
|
---|
373 | </note>
|
---|
374 |
|
---|
375 | <screen role="root"><userinput>cat > /srv/named/etc/namedb/root.hints << "EOF"
|
---|
376 | <literal>. 6D IN NS A.ROOT-SERVERS.NET.
|
---|
377 | . 6D IN NS B.ROOT-SERVERS.NET.
|
---|
378 | . 6D IN NS C.ROOT-SERVERS.NET.
|
---|
379 | . 6D IN NS D.ROOT-SERVERS.NET.
|
---|
380 | . 6D IN NS E.ROOT-SERVERS.NET.
|
---|
381 | . 6D IN NS F.ROOT-SERVERS.NET.
|
---|
382 | . 6D IN NS G.ROOT-SERVERS.NET.
|
---|
383 | . 6D IN NS H.ROOT-SERVERS.NET.
|
---|
384 | . 6D IN NS I.ROOT-SERVERS.NET.
|
---|
385 | . 6D IN NS J.ROOT-SERVERS.NET.
|
---|
386 | . 6D IN NS K.ROOT-SERVERS.NET.
|
---|
387 | . 6D IN NS L.ROOT-SERVERS.NET.
|
---|
388 | . 6D IN NS M.ROOT-SERVERS.NET.
|
---|
389 | A.ROOT-SERVERS.NET. 6D IN A 198.41.0.4
|
---|
390 | A.ROOT-SERVERS.NET. 6D IN AAAA 2001:503:ba3e::2:30
|
---|
391 | B.ROOT-SERVERS.NET. 6D IN A 192.228.79.201
|
---|
392 | B.ROOT-SERVERS.NET. 6D IN AAAA 2001:500:200::b
|
---|
393 | C.ROOT-SERVERS.NET. 6D IN A 192.33.4.12
|
---|
394 | C.ROOT-SERVERS.NET. 6D IN AAAA 2001:500:2::c
|
---|
395 | D.ROOT-SERVERS.NET. 6D IN A 199.7.91.13
|
---|
396 | D.ROOT-SERVERS.NET. 6D IN AAAA 2001:500:2d::d
|
---|
397 | E.ROOT-SERVERS.NET. 6D IN A 192.203.230.10
|
---|
398 | E.ROOT-SERVERS.NET. 6D IN AAAA 2001:500:a8::e
|
---|
399 | F.ROOT-SERVERS.NET. 6D IN A 192.5.5.241
|
---|
400 | F.ROOT-SERVERS.NET. 6D IN AAAA 2001:500:2f::f
|
---|
401 | G.ROOT-SERVERS.NET. 6D IN A 192.112.36.4
|
---|
402 | G.ROOT-SERVERS.NET. 6D IN AAAA 2001:500:12::d0d
|
---|
403 | H.ROOT-SERVERS.NET. 6D IN A 198.97.190.53
|
---|
404 | H.ROOT-SERVERS.NET. 6D IN AAAA 2001:500:1::53
|
---|
405 | I.ROOT-SERVERS.NET. 6D IN A 192.36.148.17
|
---|
406 | I.ROOT-SERVERS.NET. 6D IN AAAA 2001:7fe::53
|
---|
407 | J.ROOT-SERVERS.NET. 6D IN A 192.58.128.30
|
---|
408 | J.ROOT-SERVERS.NET. 6D IN AAAA 2001:503:c27::2:30
|
---|
409 | K.ROOT-SERVERS.NET. 6D IN A 193.0.14.129
|
---|
410 | K.ROOT-SERVERS.NET. 6D IN AAAA 2001:7fd::1
|
---|
411 | L.ROOT-SERVERS.NET. 6D IN A 199.7.83.42
|
---|
412 | L.ROOT-SERVERS.NET. 6D IN AAAA 2001:500:9f::42
|
---|
413 | M.ROOT-SERVERS.NET. 6D IN A 202.12.27.33
|
---|
414 | M.ROOT-SERVERS.NET. 6D IN AAAA 2001:dc3::35</literal>
|
---|
415 | EOF</userinput></screen>
|
---|
416 |
|
---|
417 | <para>The <filename>root.hints</filename> file is a list of root name
|
---|
418 | servers. This file must be updated periodically with the
|
---|
419 | <command>dig</command> utility. A current copy of root.hints can be
|
---|
420 | obtained from <ulink url="ftp://rs.internic.net/domain/named.root" />.
|
---|
421 | For details, consult the "BIND 9 Administrator Reference Manual", included
|
---|
422 | in every source archive of BIND 9 distributed by ISC, in HTML and PDF
|
---|
423 | formats, also available at
|
---|
424 | <ulink url="ftp://ftp.isc.org/isc/bind9/cur/&bind-minor-version;/doc/arm/Bv9ARM.html">
|
---|
425 | BIND 9 Administrator Reference Manual</ulink>.</para>
|
---|
426 |
|
---|
427 | <para>Create or modify <filename>resolv.conf</filename> to use the new
|
---|
428 | name server with the following commands:</para>
|
---|
429 |
|
---|
430 | <note>
|
---|
431 | <para>Replace <replaceable><yourdomain.com></replaceable> with
|
---|
432 | your own valid domain name.</para>
|
---|
433 | </note>
|
---|
434 |
|
---|
435 | <screen role="root"><userinput>cp /etc/resolv.conf /etc/resolv.conf.bak &&
|
---|
436 | cat > /etc/resolv.conf << "EOF"
|
---|
437 | <literal>search <replaceable><yourdomain.com></replaceable>
|
---|
438 | nameserver 127.0.0.1</literal>
|
---|
439 | EOF</userinput></screen>
|
---|
440 |
|
---|
441 | <para>Set permissions on the <command>chroot</command> jail with the
|
---|
442 | following command:</para>
|
---|
443 |
|
---|
444 | <screen role="root"><userinput>chown -R named:named /srv/named</userinput></screen>
|
---|
445 |
|
---|
446 | </sect3>
|
---|
447 |
|
---|
448 | <sect3 id="bind-init">
|
---|
449 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
450 | <phrase revision="systemd">Systemd Unit</phrase></title>
|
---|
451 |
|
---|
452 | <para>To start the DNS server at boot, install the
|
---|
453 | <phrase revision="sysv"><filename>/etc/rc.d/init.d/bind</filename> init
|
---|
454 | script</phrase>
|
---|
455 | <phrase revision="systemd"><filename>named.service</filename>
|
---|
456 | unit</phrase> included in the
|
---|
457 | <xref linkend="bootscripts" revision="sysv"/>
|
---|
458 | <xref linkend="systemd-units" revision="systemd"/> package.</para>
|
---|
459 |
|
---|
460 | <indexterm zone="bind bind-init">
|
---|
461 | <primary sortas="f-bind">bind</primary>
|
---|
462 | </indexterm>
|
---|
463 |
|
---|
464 | <screen role="root" revision="sysv"><userinput>make install-bind</userinput></screen>
|
---|
465 | <screen role="root" revision="systemd"><userinput>make install-named</userinput></screen>
|
---|
466 |
|
---|
467 | <para>Now start <application>BIND</application> with
|
---|
468 | the following command:</para>
|
---|
469 |
|
---|
470 | <screen role="root" revision="sysv"><userinput>/etc/rc.d/init.d/bind start</userinput></screen>
|
---|
471 | <screen role="root" revision="systemd"><userinput>systemctl start named</userinput></screen>
|
---|
472 |
|
---|
473 | </sect3>
|
---|
474 |
|
---|
475 | <sect3>
|
---|
476 | <title>Testing BIND</title>
|
---|
477 |
|
---|
478 | <para>Test out the new <application>BIND</application> 9 installation.
|
---|
479 | First query the local host address with <command>dig</command>:</para>
|
---|
480 |
|
---|
481 | <screen><userinput>dig -x 127.0.0.1</userinput></screen>
|
---|
482 |
|
---|
483 | <para>Now try an external name lookup, taking note of the speed
|
---|
484 | difference in repeated lookups due to the caching. Run the
|
---|
485 | <command>dig</command> command twice on the same address:</para>
|
---|
486 |
|
---|
487 | <screen><userinput>dig www.&lfs-domainname; &&
|
---|
488 | dig www.&lfs-domainname;</userinput></screen>
|
---|
489 |
|
---|
490 | <para>You can see almost instantaneous results with the named caching
|
---|
491 | lookups. Consult the <application>BIND</application> Administrator
|
---|
492 | Reference Manual located at <filename>doc/arm/Bv9ARM.html</filename>
|
---|
493 | in the package source tree, for further configuration options.</para>
|
---|
494 |
|
---|
495 | </sect3>
|
---|
496 |
|
---|
497 | </sect2>
|
---|
498 |
|
---|
499 | <sect2 role="content">
|
---|
500 | <title>Contents</title>
|
---|
501 |
|
---|
502 | <segmentedlist>
|
---|
503 | <segtitle>Installed Programs</segtitle>
|
---|
504 | <segtitle>Installed Libraries</segtitle>
|
---|
505 | <segtitle>Installed Directories</segtitle>
|
---|
506 |
|
---|
507 | <seglistitem>
|
---|
508 |
|
---|
509 | <seg>arpaname, bind9-config hardlinked to isc-config.sh, ddns-confgen,
|
---|
510 | delv, dig, dnssec-dsfromkey,
|
---|
511 | dnssec-importkey, dnssec-keyfromlabel, dnssec-keygen, dnssec-revoke,
|
---|
512 | dnssec-settime, dnssec-signzone, dnssec-verify, genrandom, host,
|
---|
513 | isc-hmac-fixup, lwresd hardlinked to named, named-checkconf,
|
---|
514 | named-checkzone, named-compilezone (symlink), named-journalprint,
|
---|
515 | named-rrchecker, nsec3hash, nslookup, nsupdate, rndc, rndc-confgen,
|
---|
516 | and tsig-keygen (symlink)</seg>
|
---|
517 |
|
---|
518 | <seg>libbind9.so, libdns.so, libirs.so, libisc.so, libisccc.so,
|
---|
519 | libisccfg.so, and liblwres.so</seg>
|
---|
520 |
|
---|
521 | <seg>/usr/include/{bind9,dns,dst,irs,isc,isccc,isccfg,lwres,pk11,pkcs11},
|
---|
522 | /usr/share/doc/bind-&bind-version; and /srv/named</seg>
|
---|
523 | </seglistitem>
|
---|
524 | </segmentedlist>
|
---|
525 |
|
---|
526 | <variablelist>
|
---|
527 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
528 | <?dbfo list-presentation="list"?>
|
---|
529 | <?dbhtml list-presentation="table"?>
|
---|
530 |
|
---|
531 | <varlistentry id="arpaname">
|
---|
532 | <term><command>arpaname</command></term>
|
---|
533 | <listitem>
|
---|
534 | <para>
|
---|
535 | translates IP addresses to the corresponding ARPA names.
|
---|
536 | </para>
|
---|
537 | <indexterm zone="bind arpaname">
|
---|
538 | <primary sortas="b-arpaname">arpaname</primary>
|
---|
539 | </indexterm>
|
---|
540 | </listitem>
|
---|
541 | </varlistentry>
|
---|
542 |
|
---|
543 | <varlistentry id="bind9-config">
|
---|
544 | <term><command>bind9-config</command></term>
|
---|
545 | <listitem>
|
---|
546 | <para>
|
---|
547 | is hardlinked to <command>isc-config.sh</command>.
|
---|
548 | </para>
|
---|
549 | <indexterm zone="bind bind9-config">
|
---|
550 | <primary sortas="b-bind9-config">bind9-config</primary>
|
---|
551 | </indexterm>
|
---|
552 | </listitem>
|
---|
553 | </varlistentry>
|
---|
554 |
|
---|
555 | <varlistentry id="ddns-confgen">
|
---|
556 | <term><command>ddns-confgen</command></term>
|
---|
557 | <listitem>
|
---|
558 | <para>
|
---|
559 | generates a key for use by nsupdate and named.
|
---|
560 | </para>
|
---|
561 | <indexterm zone="bind ddns-confgen">
|
---|
562 | <primary sortas="b-ddns-confgen">ddns-confgen</primary>
|
---|
563 | </indexterm>
|
---|
564 | </listitem>
|
---|
565 | </varlistentry>
|
---|
566 |
|
---|
567 | <varlistentry id="delv">
|
---|
568 | <term><command>delv</command></term>
|
---|
569 | <listitem>
|
---|
570 | <para>
|
---|
571 | is a new debugging tool that is a successor to
|
---|
572 | <command>dig</command>.
|
---|
573 | </para>
|
---|
574 | <indexterm zone="bind delv">
|
---|
575 | <primary sortas="b-delv">delv</primary>
|
---|
576 | </indexterm>
|
---|
577 | </listitem>
|
---|
578 | </varlistentry>
|
---|
579 |
|
---|
580 | <varlistentry id="dig">
|
---|
581 | <term><command>dig</command></term>
|
---|
582 | <listitem>
|
---|
583 | <para>interrogates DNS servers.</para>
|
---|
584 | <indexterm zone="bind dig">
|
---|
585 | <primary sortas="b-dig">dig</primary>
|
---|
586 | </indexterm>
|
---|
587 | </listitem>
|
---|
588 | </varlistentry>
|
---|
589 | <!--
|
---|
590 | <varlistentry id="dnssec-checkds">
|
---|
591 | <term><command>dnssec-checkds</command></term>
|
---|
592 | <listitem>
|
---|
593 | <para>
|
---|
594 | is a DNSSEC delegation consistency checking tool.
|
---|
595 | </para>
|
---|
596 | <indexterm zone="bind dnssec-checkds">
|
---|
597 | <primary sortas="b-dnssec-checkds">dnssec-checkds</primary>
|
---|
598 | </indexterm>
|
---|
599 | </listitem>
|
---|
600 | </varlistentry>
|
---|
601 |
|
---|
602 | <varlistentry id="dnssec-coverage">
|
---|
603 | <term><command>dnssec-coverage</command></term>
|
---|
604 | <listitem>
|
---|
605 | <para>
|
---|
606 | verifies that the DNSSEC keys for a given zone or a set of zones
|
---|
607 | have timing metadata set properly to ensure no future lapses
|
---|
608 | in DNSSEC coverage.
|
---|
609 | </para>
|
---|
610 | <indexterm zone="bind dnssec-coverage">
|
---|
611 | <primary sortas="b-dnssec-coverage">dnssec-coverage</primary>
|
---|
612 | </indexterm>
|
---|
613 | </listitem>
|
---|
614 | </varlistentry>-->
|
---|
615 |
|
---|
616 | <varlistentry id="dnssec-dsfromkey">
|
---|
617 | <term><command>dnssec-dsfromkey</command></term>
|
---|
618 | <listitem>
|
---|
619 | <para>
|
---|
620 | outputs the Delegation Signer (DS) resource record (RR).
|
---|
621 | </para>
|
---|
622 | <indexterm zone="bind dnssec-dsfromkey">
|
---|
623 | <primary sortas="b-dnssec-dsfromkey">dnssec-dsfromkey</primary>
|
---|
624 | </indexterm>
|
---|
625 | </listitem>
|
---|
626 | </varlistentry>
|
---|
627 |
|
---|
628 | <varlistentry id="dnssec-importkey">
|
---|
629 | <term><command>dnssec-importkey</command></term>
|
---|
630 | <listitem>
|
---|
631 | <para>
|
---|
632 | reads a public DNSKEY record and generates a pair of
|
---|
633 | .key/.private files.
|
---|
634 | </para>
|
---|
635 | <indexterm zone="bind dnssec-importkey">
|
---|
636 | <primary sortas="b-dnssec-importkey">dnssec-importkey</primary>
|
---|
637 | </indexterm>
|
---|
638 | </listitem>
|
---|
639 | </varlistentry>
|
---|
640 |
|
---|
641 | <varlistentry id="dnssec-keyfromlabel">
|
---|
642 | <term><command>dnssec-keyfromlabel</command></term>
|
---|
643 | <listitem>
|
---|
644 | <para>
|
---|
645 | gets keys with the given label from a crypto hardware and builds
|
---|
646 | key files for DNSSEC.
|
---|
647 | </para>
|
---|
648 | <indexterm zone="bind dnssec-keyfromlabel">
|
---|
649 | <primary sortas="b-dnssec-keyfromlabel">dnssec-keyfromlabel</primary>
|
---|
650 | </indexterm>
|
---|
651 | </listitem>
|
---|
652 | </varlistentry>
|
---|
653 |
|
---|
654 | <varlistentry id="dnssec-keygen">
|
---|
655 | <term><command>dnssec-keygen</command></term>
|
---|
656 | <listitem>
|
---|
657 | <para>is a key generator for secure DNS.</para>
|
---|
658 | <indexterm zone="bind dnssec-keygen">
|
---|
659 | <primary sortas="b-dnssec-keygen">dnssec-keygen</primary>
|
---|
660 | </indexterm>
|
---|
661 | </listitem>
|
---|
662 | </varlistentry>
|
---|
663 |
|
---|
664 | <varlistentry id="dnssec-revoke">
|
---|
665 | <term><command>dnssec-revoke</command></term>
|
---|
666 | <listitem>
|
---|
667 | <para>
|
---|
668 | sets the REVOKED bit on a DNSSEC key.
|
---|
669 | </para>
|
---|
670 | <indexterm zone="bind dnssec-revoke">
|
---|
671 | <primary sortas="b-dnssec-revoke">dnssec-revoke</primary>
|
---|
672 | </indexterm>
|
---|
673 | </listitem>
|
---|
674 | </varlistentry>
|
---|
675 |
|
---|
676 | <varlistentry id="dnssec-settime">
|
---|
677 | <term><command>dnssec-settime</command></term>
|
---|
678 | <listitem>
|
---|
679 | <para>
|
---|
680 | sets the key timing metadata for a DNSSEC key.
|
---|
681 | </para>
|
---|
682 | <indexterm zone="bind dnssec-settime">
|
---|
683 | <primary sortas="b-dnssec-settime">dnssec-settime</primary>
|
---|
684 | </indexterm>
|
---|
685 | </listitem>
|
---|
686 | </varlistentry>
|
---|
687 |
|
---|
688 | <varlistentry id="dnssec-signzone">
|
---|
689 | <term><command>dnssec-signzone</command></term>
|
---|
690 | <listitem>
|
---|
691 | <para>generates signed versions of zone files.</para>
|
---|
692 | <indexterm zone="bind dnssec-signzone">
|
---|
693 | <primary sortas="b-dnssec-signzone">dnssec-signzone</primary>
|
---|
694 | </indexterm>
|
---|
695 | </listitem>
|
---|
696 | </varlistentry>
|
---|
697 |
|
---|
698 | <varlistentry id="dnssec-verify">
|
---|
699 | <term><command>dnssec-verify</command></term>
|
---|
700 | <listitem>
|
---|
701 | <para>
|
---|
702 | verifies that a zone is fully signed for each algorithm found
|
---|
703 | in the DNSKEY RRset for the zone, and that the NSEC / NSEC3
|
---|
704 | chains are complete.
|
---|
705 | </para>
|
---|
706 | <indexterm zone="bind dnssec-verify">
|
---|
707 | <primary sortas="b-dnssec-verify">dnssec-verify</primary>
|
---|
708 | </indexterm>
|
---|
709 | </listitem>
|
---|
710 | </varlistentry>
|
---|
711 |
|
---|
712 | <varlistentry id="genrandom">
|
---|
713 | <term><command>genrandom</command></term>
|
---|
714 | <listitem>
|
---|
715 | <para>
|
---|
716 | generates a file containing random data.
|
---|
717 | </para>
|
---|
718 | <indexterm zone="bind genrandom">
|
---|
719 | <primary sortas="b-genrandom">genrandom</primary>
|
---|
720 | </indexterm>
|
---|
721 | </listitem>
|
---|
722 | </varlistentry>
|
---|
723 |
|
---|
724 | <varlistentry id="host">
|
---|
725 | <term><command>host</command></term>
|
---|
726 | <listitem>
|
---|
727 | <para>is a utility for DNS lookups.</para>
|
---|
728 | <indexterm zone="bind host">
|
---|
729 | <primary sortas="b-host">host</primary>
|
---|
730 | </indexterm>
|
---|
731 | </listitem>
|
---|
732 | </varlistentry>
|
---|
733 |
|
---|
734 | <varlistentry id="isc-config.sh">
|
---|
735 | <term><command>isc-config.sh</command></term>
|
---|
736 | <listitem>
|
---|
737 | <para>
|
---|
738 | prints information related to the installed version of ISC BIND.
|
---|
739 | </para>
|
---|
740 | <indexterm zone="bind isc-config.sh">
|
---|
741 | <primary sortas="b-isc-config.sh">isc-config.sh</primary>
|
---|
742 | </indexterm>
|
---|
743 | </listitem>
|
---|
744 | </varlistentry>
|
---|
745 |
|
---|
746 | <varlistentry id="isc-hmac-fixup">
|
---|
747 | <term><command>isc-hmac-fixup</command></term>
|
---|
748 | <listitem>
|
---|
749 | <para>
|
---|
750 | fixes HMAC keys generated by older versions of BIND.
|
---|
751 | </para>
|
---|
752 | <indexterm zone="bind isc-hmac-fixup">
|
---|
753 | <primary sortas="b-isc-hmac-fixup">isc-hmac-fixup</primary>
|
---|
754 | </indexterm>
|
---|
755 | </listitem>
|
---|
756 | </varlistentry>
|
---|
757 |
|
---|
758 | <varlistentry id="lwresd">
|
---|
759 | <term><command>lwresd</command></term>
|
---|
760 | <listitem>
|
---|
761 | <para>is a caching-only name server for local process use.</para>
|
---|
762 | <indexterm zone="bind lwresd">
|
---|
763 | <primary sortas="b-lwresd">lwresd</primary>
|
---|
764 | </indexterm>
|
---|
765 | </listitem>
|
---|
766 | </varlistentry>
|
---|
767 |
|
---|
768 | <varlistentry id="named">
|
---|
769 | <term><command>named</command></term>
|
---|
770 | <listitem>
|
---|
771 | <para>is the name server daemon.</para>
|
---|
772 | <indexterm zone="bind named">
|
---|
773 | <primary sortas="b-named">named</primary>
|
---|
774 | </indexterm>
|
---|
775 | </listitem>
|
---|
776 | </varlistentry>
|
---|
777 |
|
---|
778 | <varlistentry id="named-checkconf">
|
---|
779 | <term><command>named-checkconf</command></term>
|
---|
780 | <listitem>
|
---|
781 | <para>checks the syntax of <filename>named.conf</filename>
|
---|
782 | files.</para>
|
---|
783 | <indexterm zone="bind named-checkconf">
|
---|
784 | <primary sortas="b-named-checkconf">named-checkconf</primary>
|
---|
785 | </indexterm>
|
---|
786 | </listitem>
|
---|
787 | </varlistentry>
|
---|
788 |
|
---|
789 | <varlistentry id="named-checkzone">
|
---|
790 | <term><command>named-checkzone</command></term>
|
---|
791 | <listitem>
|
---|
792 | <para>checks zone file validity.</para>
|
---|
793 | <indexterm zone="bind named-checkzone">
|
---|
794 | <primary sortas="b-named-checkzone">named-checkzone</primary>
|
---|
795 | </indexterm>
|
---|
796 | </listitem>
|
---|
797 | </varlistentry>
|
---|
798 |
|
---|
799 | <varlistentry id="named-compilezone">
|
---|
800 | <term><command>named-compilezone</command></term>
|
---|
801 | <listitem>
|
---|
802 | <para>
|
---|
803 | is similar to <command>named-checkzone</command>, but it always
|
---|
804 | dumps the zone contents to a specified file in a specified format.
|
---|
805 | </para>
|
---|
806 | <indexterm zone="bind named-compilezone">
|
---|
807 | <primary sortas="b-named-compilezone">named-compilezone</primary>
|
---|
808 | </indexterm>
|
---|
809 | </listitem>
|
---|
810 | </varlistentry>
|
---|
811 |
|
---|
812 | <varlistentry id="named-journalprint">
|
---|
813 | <term><command>named-journalprint</command></term>
|
---|
814 | <listitem>
|
---|
815 | <para>
|
---|
816 | prints the zone journal in human-readable form.
|
---|
817 | </para>
|
---|
818 | <indexterm zone="bind named-journalprint">
|
---|
819 | <primary sortas="b-named-journalprint">named-journalprint</primary>
|
---|
820 | </indexterm>
|
---|
821 | </listitem>
|
---|
822 | </varlistentry>
|
---|
823 |
|
---|
824 | <varlistentry id="named-rrchecker">
|
---|
825 | <term><command>named-rrchecker</command></term>
|
---|
826 | <listitem>
|
---|
827 | <para>
|
---|
828 | reads an individual DNS resource record from standard input and
|
---|
829 | checks if it is syntactically correct.
|
---|
830 | </para>
|
---|
831 | <indexterm zone="bind named-rrchecker">
|
---|
832 | <primary sortas="b-named-rrchecker">named-rrchecker</primary>
|
---|
833 | </indexterm>
|
---|
834 | </listitem>
|
---|
835 | </varlistentry>
|
---|
836 |
|
---|
837 | <varlistentry id="nsec3hash">
|
---|
838 | <term><command>nsec3hash</command></term>
|
---|
839 | <listitem>
|
---|
840 | <para>
|
---|
841 | generates an NSEC3 hash based on a set of NSEC3 parameters.
|
---|
842 | </para>
|
---|
843 | <indexterm zone="bind nsec3hash">
|
---|
844 | <primary sortas="b-nsec3hash">nsec3hash</primary>
|
---|
845 | </indexterm>
|
---|
846 | </listitem>
|
---|
847 | </varlistentry>
|
---|
848 |
|
---|
849 | <varlistentry id="nslookup">
|
---|
850 | <term><command>nslookup</command></term>
|
---|
851 | <listitem>
|
---|
852 | <para>is a program used to query Internet domain nameservers.</para>
|
---|
853 | <indexterm zone="bind nslookup">
|
---|
854 | <primary sortas="b-nslookup">nslookup</primary>
|
---|
855 | </indexterm>
|
---|
856 | </listitem>
|
---|
857 | </varlistentry>
|
---|
858 |
|
---|
859 | <varlistentry id="nsupdate">
|
---|
860 | <term><command>nsupdate</command></term>
|
---|
861 | <listitem>
|
---|
862 | <para>is used to submit DNS update requests.</para>
|
---|
863 | <indexterm zone="bind nsupdate">
|
---|
864 | <primary sortas="b-nsupdate">nsupdate</primary>
|
---|
865 | </indexterm>
|
---|
866 | </listitem>
|
---|
867 | </varlistentry>
|
---|
868 |
|
---|
869 | <varlistentry id="rndc">
|
---|
870 | <term><command>rndc</command></term>
|
---|
871 | <listitem>
|
---|
872 | <para>controls the operation of <application>BIND</application>.</para>
|
---|
873 | <indexterm zone="bind rndc">
|
---|
874 | <primary sortas="b-rndc">rndc</primary>
|
---|
875 | </indexterm>
|
---|
876 | </listitem>
|
---|
877 | </varlistentry>
|
---|
878 |
|
---|
879 | <varlistentry id="rndc-confgen">
|
---|
880 | <term><command>rndc-confgen</command></term>
|
---|
881 | <listitem>
|
---|
882 | <para>generates <filename>rndc.conf</filename> files.</para>
|
---|
883 | <indexterm zone="bind rndc-confgen">
|
---|
884 | <primary sortas="b-rndc-confgen">rndc-confgen</primary>
|
---|
885 | </indexterm>
|
---|
886 | </listitem>
|
---|
887 | </varlistentry>
|
---|
888 |
|
---|
889 | <varlistentry id="tsig-keygen">
|
---|
890 | <term><command>tsig-keygen</command></term>
|
---|
891 | <listitem>
|
---|
892 | <para>
|
---|
893 | is a symlink to <command>ddns-confgen</command>.
|
---|
894 | </para>
|
---|
895 | <indexterm zone="bind tsig-keygen">
|
---|
896 | <primary sortas="b-tsig-keygen">tsig-keygen</primary>
|
---|
897 | </indexterm>
|
---|
898 | </listitem>
|
---|
899 | </varlistentry>
|
---|
900 |
|
---|
901 | </variablelist>
|
---|
902 |
|
---|
903 | </sect2>
|
---|
904 |
|
---|
905 | </sect1>
|
---|