lwresd.docbook revision dafcb997e390efa4423883dafd100c975c4095d6
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley - Copyright (C) 2000, 2001 Internet Software Consortium.
dd750c560ae48cf6caeb9a9fe81d33fc4746106dBrian Wellington - Permission to use, copy, modify, and distribute this software for any
dd750c560ae48cf6caeb9a9fe81d33fc4746106dBrian Wellington - purpose with or without fee is hereby granted, provided that the above
dd750c560ae48cf6caeb9a9fe81d33fc4746106dBrian Wellington - copyright notice and this permission notice appear in all copies.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews<!-- $Id: lwresd.docbook,v 1.7 2004/03/05 04:57:48 marka Exp $ -->
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <refentryinfo>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </refentryinfo>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <refentrytitle><application>lwresd</application></refentrytitle>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <refnamediv>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <refname><application>lwresd</application></refname>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <refpurpose>lightweight resolver daemon</refpurpose>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </refnamediv>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <refsynopsisdiv>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <cmdsynopsis>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <arg><option>-C <replaceable class="parameter">config-file</replaceable></option></arg>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <arg><option>-d <replaceable class="parameter">debug-level</replaceable></option></arg>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <arg><option>-i <replaceable class="parameter">pid-file</replaceable></option></arg>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <arg><option>-n <replaceable class="parameter">#cpus</replaceable></option></arg>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <arg><option>-P <replaceable class="parameter">port</replaceable></option></arg>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <arg><option>-p <replaceable class="parameter">port</replaceable></option></arg>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <arg><option>-u <replaceable class="parameter">user</replaceable></option></arg>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </cmdsynopsis>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </refsynopsisdiv>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <command>lwresd</command> is the daemon providing name lookup
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley services to clients that use the BIND 9 lightweight resolver
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley library. It is essentially a stripped-down, caching-only name
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley server that answers queries using the BIND 9 lightweight
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley resolver protocol rather than the DNS protocol.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <command>lwresd</command> listens for resolver queries on a
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley UDP port on the IPv4 loopback interface, 127.0.0.1. This
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley means that <command>lwresd</command> can only be used by
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley processes running on the local machine. By default UDP port
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley number 921 is used for lightweight resolver requests and
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley Incoming lightweight resolver requests are decoded by the
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley server which then resolves them using the DNS protocol. When
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley the DNS lookup completes, <command>lwresd</command> encodes
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley the answers in the lightweight resolver format and returns
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley them to the client that made the request.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley If <filename>/etc/resolv.conf</filename> contains any
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <option>nameserver</option> entries, <command>lwresd</command>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley sends recursive DNS queries to those servers. This is similar
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley to the use of forwarders in a caching name server. If no
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <option>nameserver</option> entries are present, or if
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley forwarding fails, <command>lwresd</command> resolves the
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley queries autonomously starting at the root name servers, using
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley a built-in list of root server hints.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <variablelist>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <term>-C <replaceable class="parameter">config-file</replaceable></term>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley Use <replaceable
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley class="parameter">config-file</replaceable> as the
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley configuration file instead of the default,
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <term>-d <replaceable class="parameter">debug-level</replaceable></term>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley Set the daemon's debug level to <replaceable
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley Debugging traces from <command>lwresd</command> become
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley more verbose as the debug level increases.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley Run the server in the foreground (i.e. do not daemonize).
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley Run the server in the foreground and force all logging
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <term>-n <replaceable class="parameter">#cpus</replaceable></term>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley Create <replaceable
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley class="parameter">#cpus</replaceable> worker threads
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley to take advantage of multiple CPUs. If not specified,
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <command>lwresd</command> will try to determine the
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley number of CPUs present and create one thread per CPU.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley If it is unable to determine the number of CPUs, a
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley single worker thread will be created.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <term>-P <replaceable class="parameter">port</replaceable></term>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley Listen for lightweight resolver queries on port
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <replaceable class="parameter">port</replaceable>. If
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley not specified, the default is port 921.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <term>-p <replaceable class="parameter">port</replaceable></term>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley Send DNS lookups to port <replaceable
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley specified, the default is port 53. This provides a
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley way of testing the lightweight resolver daemon with a
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley name server that listens for queries on a non-standard
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley port number.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
cd7e84891ce3377afe5f3195855261c83a4469f6David Lawrence Write memory usage statistics to <filename>stdout</filename>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley This option is mainly of interest to BIND 9 developers
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley and may be removed or changed in a future release.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <term>-t <replaceable class="parameter">directory</replaceable></term>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley processing the command line arguments, but before
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley reading the configuration file.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley This option should be used in conjunction with the
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <option>-u</option> option, as chrooting a process
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley running as root doesn't enhance security on most
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley systems; the way <function>chroot()</function> is
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley defined allows a process with root privileges to
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley escape a chroot jail.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <term>-u <replaceable class="parameter">user</replaceable></term>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley class="parameter">user</replaceable> after completing
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley privileged operations, such as creating sockets that
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley listen on privileged ports.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley Report the version number and exit.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </variablelist>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <variablelist>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <term><filename>/etc/resolv.conf</filename></term>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley The default configuration file.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <term><filename>/var/run/lwresd.pid</filename></term>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley The default process-id file.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </varlistentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </variablelist>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <citerefentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </citerefentry>,
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <citerefentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </citerefentry>,
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <citerefentry>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley </citerefentry>.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley <corpauthor>Internet Software Consortium</corpauthor>
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley - Local variables:
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley - mode: sgml