1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
3 - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
4 - Copyright (C) 2000, 2001 Internet Software Consortium.
6 - Permission to use, copy, modify, and distribute this software for any
7 - purpose with or without fee is hereby granted, provided that the above
8 - copyright notice and this permission notice appear in all copies.
10 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 - PERFORMANCE OF THIS SOFTWARE.
19 <!-- $Id: lwresd.docbook,v 1.6.208.2 2004/06/03 02:24:57 marka Exp $ -->
23 <date>June 30, 2000</date>
27 <refentrytitle><application>lwresd</application></refentrytitle>
28 <manvolnum>8</manvolnum>
29 <refmiscinfo>BIND9</refmiscinfo>
33 <refname><application>lwresd</application></refname>
34 <refpurpose>lightweight resolver daemon</refpurpose>
39 <command>lwresd</command>
40 <arg><option>-C <replaceable class="parameter">config-file</replaceable></option></arg>
41 <arg><option>-d <replaceable class="parameter">debug-level</replaceable></option></arg>
42 <arg><option>-f</option></arg>
43 <arg><option>-g</option></arg>
44 <arg><option>-i <replaceable class="parameter">pid-file</replaceable></option></arg>
45 <arg><option>-n <replaceable class="parameter">#cpus</replaceable></option></arg>
46 <arg><option>-P <replaceable class="parameter">port</replaceable></option></arg>
47 <arg><option>-p <replaceable class="parameter">port</replaceable></option></arg>
48 <arg><option>-s</option></arg>
49 <arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
50 <arg><option>-u <replaceable class="parameter">user</replaceable></option></arg>
51 <arg><option>-v</option></arg>
56 <title>DESCRIPTION</title>
58 <command>lwresd</command> is the daemon providing name lookup
59 services to clients that use the BIND 9 lightweight resolver
60 library. It is essentially a stripped-down, caching-only name
61 server that answers queries using the BIND 9 lightweight
62 resolver protocol rather than the DNS protocol.
65 <command>lwresd</command> listens for resolver queries on a
66 UDP port on the IPv4 loopback interface, 127.0.0.1. This
67 means that <command>lwresd</command> can only be used by
68 processes running on the local machine. By default UDP port
69 number 921 is used for lightweight resolver requests and
73 Incoming lightweight resolver requests are decoded by the
74 server which then resolves them using the DNS protocol. When
75 the DNS lookup completes, <command>lwresd</command> encodes
76 the answers in the lightweight resolver format and returns
77 them to the client that made the request.
80 If <filename>/etc/resolv.conf</filename> contains any
81 <option>nameserver</option> entries, <command>lwresd</command>
82 sends recursive DNS queries to those servers. This is similar
83 to the use of forwarders in a caching name server. If no
84 <option>nameserver</option> entries are present, or if
85 forwarding fails, <command>lwresd</command> resolves the
86 queries autonomously starting at the root name servers, using
87 a built-in list of root server hints.
92 <title>OPTIONS</title>
96 <term>-C <replaceable class="parameter">config-file</replaceable></term>
100 class="parameter">config-file</replaceable> as the
101 configuration file instead of the default,
102 <filename>/etc/resolv.conf</filename>.
108 <term>-d <replaceable class="parameter">debug-level</replaceable></term>
111 Set the daemon's debug level to <replaceable
112 class="parameter">debug-level</replaceable>.
113 Debugging traces from <command>lwresd</command> become
114 more verbose as the debug level increases.
123 Run the server in the foreground (i.e. do not daemonize).
132 Run the server in the foreground and force all logging
133 to <filename>stderr</filename>.
139 <term>-n <replaceable class="parameter">#cpus</replaceable></term>
143 class="parameter">#cpus</replaceable> worker threads
144 to take advantage of multiple CPUs. If not specified,
145 <command>lwresd</command> will try to determine the
146 number of CPUs present and create one thread per CPU.
147 If it is unable to determine the number of CPUs, a
148 single worker thread will be created.
154 <term>-P <replaceable class="parameter">port</replaceable></term>
157 Listen for lightweight resolver queries on port
158 <replaceable class="parameter">port</replaceable>. If
159 not specified, the default is port 921.
165 <term>-p <replaceable class="parameter">port</replaceable></term>
168 Send DNS lookups to port <replaceable
169 class="parameter">port</replaceable>. If not
170 specified, the default is port 53. This provides a
171 way of testing the lightweight resolver daemon with a
172 name server that listens for queries on a non-standard
182 Write memory usage statistics to <filename>stdout</filename>
187 This option is mainly of interest to BIND 9 developers
188 and may be removed or changed in a future release.
195 <term>-t <replaceable class="parameter">directory</replaceable></term>
198 <function>chroot()</function> to <replaceable
199 class="parameter">directory</replaceable> after
200 processing the command line arguments, but before
201 reading the configuration file.
205 This option should be used in conjunction with the
206 <option>-u</option> option, as chrooting a process
207 running as root doesn't enhance security on most
208 systems; the way <function>chroot()</function> is
209 defined allows a process with root privileges to
210 escape a chroot jail.
217 <term>-u <replaceable class="parameter">user</replaceable></term>
220 <function>setuid()</function> to <replaceable
221 class="parameter">user</replaceable> after completing
222 privileged operations, such as creating sockets that
223 listen on privileged ports.
232 Report the version number and exit.
247 <term><filename>/etc/resolv.conf</filename></term>
250 The default configuration file.
256 <term><filename>/var/run/lwresd.pid</filename></term>
259 The default process-id file.
269 <title>SEE ALSO</title>
272 <refentrytitle>named</refentrytitle>
273 <manvolnum>8</manvolnum>
276 <refentrytitle>lwres</refentrytitle>
277 <manvolnum>3</manvolnum>
280 <refentrytitle>resolver</refentrytitle>
281 <manvolnum>5</manvolnum>
287 <title>AUTHOR</title>
289 <corpauthor>Internet Systems Consortium</corpauthor>