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