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