lwresd.html revision 75c0816e8295e180f4bc7f10db3d0d880383bc1c
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User - Copyright (C) 2000, 2001 Internet Software Consortium.
1167fc7904c5f0a472f8df207ac46dd52c7f1ec8Automatic Updater - Permission to use, copy, modify, and distribute this software for any
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater - purpose with or without fee is hereby granted, provided that the above
46da3117812814a29432a8d9a9ccf8acdbfdadceAutomatic Updater - copyright notice and this permission notice appear in all copies.
fe84edc17e0d582cf7b4270f8df9d4742a107b1cAutomatic Updater - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
79b273c187a4aa1016a62181983dfdd0521681aeMark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
bed0874e1a09e810575328c4bfc346a47514b69fMark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
b253dcf9668f95e141bce9556dc88e30d3305a1dTinderbox User - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User - PERFORMANCE OF THIS SOFTWARE.
e20309353e6246485c521278131d3fced73d7957Tinderbox User<!-- $Id: lwresd.html,v 1.13 2005/05/13 03:14:05 marka Exp $ -->
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
e20309353e6246485c521278131d3fced73d7957Tinderbox User<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<a name="id2456836"></a><div class="titlepage"></div>
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<p><span class="application">lwresd</span> — lightweight resolver daemon</p>
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson<div class="cmdsynopsis"><p><code class="command">lwresd</code> [<code class="option">-C <em class="replaceable"><code>config-file</code></em></code>] [<code class="option">-d <em class="replaceable"><code>debug-level</code></em></code>] [<code class="option">-f</code>] [<code class="option">-g</code>] [<code class="option">-i <em class="replaceable"><code>pid-file</code></em></code>] [<code class="option">-n <em class="replaceable"><code>#cpus</code></em></code>] [<code class="option">-P <em class="replaceable"><code>port</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port</code></em></code>] [<code class="option">-s</code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-u <em class="replaceable"><code>user</code></em></code>] [<code class="option">-v</code>]</p></div>
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt<p><span><strong class="command">lwresd</strong></span>
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater is the daemon providing name lookup
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater services to clients that use the BIND 9 lightweight resolver
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt library. It is essentially a stripped-down, caching-only name
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater server that answers queries using the BIND 9 lightweight
e6fc17ec5ad5ba1c4bf5730b2b97c82d1f2b8f3cMark Andrews resolver protocol rather than the DNS protocol.
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt<p><span><strong class="command">lwresd</strong></span>
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater listens for resolver queries on a
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updater UDP port on the IPv4 loopback interface, 127.0.0.1. This
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt means that <span><strong class="command">lwresd</strong></span> can only be used by
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User processes running on the local machine. By default UDP port
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater number 921 is used for lightweight resolver requests and
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater Incoming lightweight resolver requests are decoded by the
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater server which then resolves them using the DNS protocol. When
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater the DNS lookup completes, <span><strong class="command">lwresd</strong></span> encodes
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater the answers in the lightweight resolver format and returns
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater them to the client that made the request.
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews If <code class="filename">/etc/resolv.conf</code> contains any
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User <code class="option">nameserver</code> entries, <span><strong class="command">lwresd</strong></span>
e20309353e6246485c521278131d3fced73d7957Tinderbox User sends recursive DNS queries to those servers. This is similar
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews to the use of forwarders in a caching name server. If no
e5a3fb2b751598fdbcf2cde07a47202aaab93081Tinderbox User <code class="option">nameserver</code> entries are present, or if
e20309353e6246485c521278131d3fced73d7957Tinderbox User forwarding fails, <span><strong class="command">lwresd</strong></span> resolves the
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews queries autonomously starting at the root name servers, using
a80993946f29ff39df38818ee9b2e58a4e46cb7eTinderbox User a built-in list of root server hints.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<dt><span class="term">-C <em class="replaceable"><code>config-file</code></em></span></dt>
693c4232dfdffaff672197d4b9fea944c64cf80aAutomatic Updater Use <em class="replaceable"><code>config-file</code></em> as the
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews configuration file instead of the default,
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater <code class="filename">/etc/resolv.conf</code>.
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater<dt><span class="term">-d <em class="replaceable"><code>debug-level</code></em></span></dt>
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews Set the daemon's debug level to <em class="replaceable"><code>debug-level</code></em>.
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater Debugging traces from <span><strong class="command">lwresd</strong></span> become
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson more verbose as the debug level increases.
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater Run the server in the foreground (i.e. do not daemonize).
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User Run the server in the foreground and force all logging
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont<dt><span class="term">-n <em class="replaceable"><code>#cpus</code></em></span></dt>
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User Create <em class="replaceable"><code>#cpus</code></em> worker threads
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont to take advantage of multiple CPUs. If not specified,
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews <span><strong class="command">lwresd</strong></span> will try to determine the
2ba8f584b97cbab864570e38fd26b8cb90961428Tinderbox User number of CPUs present and create one thread per CPU.
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User If it is unable to determine the number of CPUs, a
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews single worker thread will be created.
bed0874e1a09e810575328c4bfc346a47514b69fMark Andrews<dt><span class="term">-P <em class="replaceable"><code>port</code></em></span></dt>
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews Listen for lightweight resolver queries on port
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews <em class="replaceable"><code>port</code></em>. If
2ba8f584b97cbab864570e38fd26b8cb90961428Tinderbox User not specified, the default is port 921.
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
a01aa536188bb3535dfc1107a623e6355a8e6b7cMark Andrews Send DNS lookups to port <em class="replaceable"><code>port</code></em>. If not
89623368b8f662d458d9964b923050f33c5f75b0Tinderbox User specified, the default is port 53. This provides a
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews way of testing the lightweight resolver daemon with a
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews name server that listens for queries on a non-standard
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews port number.
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater Write memory usage statistics to <code class="filename">stdout</code>
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater This option is mainly of interest to BIND 9 developers
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater and may be removed or changed in a future release.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater to <em class="replaceable"><code>directory</code></em> after
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater processing the command line arguments, but before
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater reading the configuration file.
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater This option should be used in conjunction with the
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User <code class="option">-u</code> option, as chrooting a process
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User running as root doesn't enhance security on most
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User systems; the way <code class="function">chroot()</code> is
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User defined allows a process with root privileges to
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User escape a chroot jail.
c6a0f4ae1d7183a16ffb196b86b647f870694796Automatic Updater<dt><span class="term">-u <em class="replaceable"><code>user</code></em></span></dt>
8f2c45a35dd8c40bcc9caba8f7d40ce64fc27bcdAutomatic Updater<dd><p><code class="function">setuid()</code>
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User to <em class="replaceable"><code>user</code></em> after completing
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User privileged operations, such as creating sockets that
269519eeb959d905ed125f96426e01d725c3b597Tinderbox User listen on privileged ports.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater Report the version number and exit.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater<dt><span class="term"><code class="filename">/etc/resolv.conf</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater The default configuration file.
7f79131f9a8e804b93c57f3c679065cce878b726Automatic Updater<dt><span class="term"><code class="filename">/var/run/lwresd.pid</code></span></dt>
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater The default process-id file.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater<p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updater <span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>,
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater <span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
6a9d2121152c94cb9e35832126c3f2e4d18d81edTinderbox User<p><span class="corpauthor">Internet Systems Consortium</span>