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