lwresd.html revision 8de7014e56565605a51898a2a33a8b08fd3f1e57
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson<!--
010a51c427bfb6ab658fc0056955a1a5b69810beTinderbox User - Copyright (C) 2000, 2001 Internet Software Consortium.
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews -
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Permission to use, copy, modify, and distribute this software for any
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater - purpose with or without fee is hereby granted, provided that the above
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson - copyright notice and this permission notice appear in all copies.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson -
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson-->
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<HTML
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><HEAD
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><TITLE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>lwresd</TITLE
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User><META
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinNAME="GENERATOR"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONTENT="Modular DocBook HTML Stylesheet Version 1.61
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User"></HEAD
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User><BODY
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="REFENTRY"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserBGCOLOR="#FFFFFF"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinTEXT="#000000"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserLINK="#0000FF"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinVLINK="#840084"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserALINK="#0000FF"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><H1
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User><A
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinNAME="AEN1"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><SPAN
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="APPLICATION"
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User>lwresd</SPAN
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews></A
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User></H1
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User><DIV
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="REFNAMEDIV"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><A
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinNAME="AEN9"
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User></A
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews><H2
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User>Name</H2
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User><SPAN
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="APPLICATION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>lwresd</SPAN
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>&nbsp;--&nbsp;lightweight resolver daemon</DIV
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><DIV
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCLASS="REFSYNOPSISDIV"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><A
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinNAME="AEN13"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein></A
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User><H2
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>Synopsis</H2
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><P
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User><B
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCLASS="COMMAND"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>lwresd</B
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein> [<TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="OPTION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>-C <TT
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCLASS="REPLACEABLE"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>config-file</I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein></TT
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User></TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>] [<TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="OPTION"
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User>-d <TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCLASS="REPLACEABLE"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>debug-level</I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein></TT
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User></TT
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews>] [<TT
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCLASS="OPTION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>-f</TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User>] [<TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCLASS="OPTION"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User>-g</TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User>] [<TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="OPTION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>-i <TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="REPLACEABLE"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>pid-file</I
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User></TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein></TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>] [<TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="OPTION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>-n <TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="REPLACEABLE"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><I
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User>#cpus</I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein></TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein></TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>] [<TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="OPTION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>-P <TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="REPLACEABLE"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><I
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User>port</I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein></TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein></TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>] [<TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="OPTION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>-p <TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="REPLACEABLE"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>port</I
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User></TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User></TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User>] [<TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCLASS="OPTION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>-s</TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>] [<TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="OPTION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>-t <TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="REPLACEABLE"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>directory</I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein></TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User></TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>] [<TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="OPTION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>-u <TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="REPLACEABLE"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>user</I
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User></TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User></TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User>] [<TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCLASS="OPTION"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User>-v</TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>]</P
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User></DIV
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User><DIV
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCLASS="REFSECT1"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User><A
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinNAME="AEN48"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User></A
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><H2
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>DESCRIPTION</H2
><P
> <B
CLASS="COMMAND"
>lwresd</B
> is the daemon providing name lookup
services to clients that use the BIND 9 lightweight resolver
library. It is essentially a stripped-down, caching-only name
server that answers queries using the BIND 9 lightweight
resolver protocol rather than the DNS protocol.
</P
><P
> <B
CLASS="COMMAND"
>lwresd</B
> listens for resolver queries on a
UDP port on the IPv4 loopback interface, 127.0.0.1. This
means that <B
CLASS="COMMAND"
>lwresd</B
> can only be used by
processes running on the local machine. By default UDP port
number 921 is used for lightweight resolver requests and
responses.
</P
><P
> Incoming lightweight resolver requests are decoded by the
server which then resolves them using the DNS protocol. When
the DNS lookup completes, <B
CLASS="COMMAND"
>lwresd</B
> encodes
the answers in the lightweight resolver format and returns
them to the client that made the request.
</P
><P
> If <TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
> contains any
<TT
CLASS="OPTION"
>nameserver</TT
> entries, <B
CLASS="COMMAND"
>lwresd</B
>
sends recursive DNS queries to those servers. This is similar
to the use of forwarders in a caching name server. If no
<TT
CLASS="OPTION"
>nameserver</TT
> entries are present, or if
forwarding fails, <B
CLASS="COMMAND"
>lwresd</B
> resolves the
queries autonomously starting at the root name servers, using
a built-in list of root server hints.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN63"
></A
><H2
>OPTIONS</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>-C <TT
CLASS="REPLACEABLE"
><I
>config-file</I
></TT
></DT
><DD
><P
> Use <TT
CLASS="REPLACEABLE"
><I
>config-file</I
></TT
> as the
configuration file instead of the default,
<TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
>.
</P
></DD
><DT
>-d <TT
CLASS="REPLACEABLE"
><I
>debug-level</I
></TT
></DT
><DD
><P
> Set the daemon's debug level to <TT
CLASS="REPLACEABLE"
><I
>debug-level</I
></TT
>.
Debugging traces from <B
CLASS="COMMAND"
>lwresd</B
> become
more verbose as the debug level increases.
</P
></DD
><DT
>-f</DT
><DD
><P
> Run the server in the foreground (i.e. do not daemonize).
</P
></DD
><DT
>-g</DT
><DD
><P
> Run the server in the foreground and force all logging
to <TT
CLASS="FILENAME"
>stderr</TT
>.
</P
></DD
><DT
>-n <TT
CLASS="REPLACEABLE"
><I
>#cpus</I
></TT
></DT
><DD
><P
> Create <TT
CLASS="REPLACEABLE"
><I
>#cpus</I
></TT
> worker threads
to take advantage of multiple CPUs. If not specified,
<B
CLASS="COMMAND"
>lwresd</B
> will try to determine the
number of CPUs present and create one thread per CPU.
If it is unable to determine the number of CPUs, a
single worker thread will be created.
</P
></DD
><DT
>-P <TT
CLASS="REPLACEABLE"
><I
>port</I
></TT
></DT
><DD
><P
> Listen for lightweight resolver queries on port
<TT
CLASS="REPLACEABLE"
><I
>port</I
></TT
>. If
not specified, the default is port 921.
</P
></DD
><DT
>-p <TT
CLASS="REPLACEABLE"
><I
>port</I
></TT
></DT
><DD
><P
> Send DNS lookups to port <TT
CLASS="REPLACEABLE"
><I
>port</I
></TT
>. If not
specified, the default is port 53. This provides a
way of testing the lightweight resolver daemon with a
name server that listens for queries on a non-standard
port number.
</P
></DD
><DT
>-s</DT
><DD
><P
> Write memory usage statistics to <TT
CLASS="FILENAME"
>stdout</TT
>
on exit.
</P
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
> This option is mainly of interest to BIND 9 developers
and may be removed or changed in a future release.
</P
></BLOCKQUOTE
></DIV
></DD
><DT
>-t <TT
CLASS="REPLACEABLE"
><I
>directory</I
></TT
></DT
><DD
><P
> <TT
CLASS="FUNCTION"
>chroot()</TT
> to <TT
CLASS="REPLACEABLE"
><I
>directory</I
></TT
> after
processing the command line arguments, but before
reading the configuration file.
</P
><DIV
CLASS="WARNING"
><P
></P
><TABLE
CLASS="WARNING"
BORDER="1"
WIDTH="90%"
><TR
><TD
ALIGN="CENTER"
><B
>Warning</B
></TD
></TR
><TR
><TD
ALIGN="LEFT"
><P
> This option should be used in conjunction with the
<TT
CLASS="OPTION"
>-u</TT
> option, as chrooting a process
running as root doesn't enhance security on most
systems; the way <TT
CLASS="FUNCTION"
>chroot()</TT
> is
defined allows a process with root privileges to
escape a chroot jail.
</P
></TD
></TR
></TABLE
></DIV
></DD
><DT
>-u <TT
CLASS="REPLACEABLE"
><I
>user</I
></TT
></DT
><DD
><P
> <TT
CLASS="FUNCTION"
>setuid()</TT
> to <TT
CLASS="REPLACEABLE"
><I
>user</I
></TT
> after completing
privileged operations, such as creating sockets that
listen on privileged ports.
</P
></DD
><DT
>-v</DT
><DD
><P
> Report the version number and exit.
</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN137"
></A
><H2
>FILES</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
></DT
><DD
><P
> The default configuration file.
</P
></DD
><DT
><TT
CLASS="FILENAME"
>/var/run/lwresd.pid</TT
></DT
><DD
><P
> The default process-id file.
</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN150"
></A
><H2
>SEE ALSO</H2
><P
> <SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>named</SPAN
>(8)</SPAN
>,
<SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>lwres</SPAN
>(3)</SPAN
>,
<SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>resolver</SPAN
>(5)</SPAN
>.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN162"
></A
><H2
>AUTHOR</H2
><P
> Internet Software Consortium
</P
></DIV
></BODY
></HTML
>