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