man.lwresd.html revision e21a6f5ec65fad1c18f6723f5495e55bcd15a53d
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye - Copyright (C) 2000-2015 Internet Systems Consortium, Inc. ("ISC")
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye - This Source Code Form is subject to the terms of the Mozilla Public
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye - License, v. 2.0. If a copy of the MPL was not distributed with this
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye - file, You can obtain one at http://mozilla.org/MPL/2.0/.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<link rel="up" href="Bv9ARM.ch13.html" title="Manual pages">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<link rel="prev" href="man.dnssec-verify.html" title="dnssec-verify">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<link rel="next" href="man.named.html" title="named">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
7a2e6a2ffa6fa05b7abd1f850c642a9387ac1630Vladimir Kotal<table width="100%" summary="Navigation header">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<tr><th colspan="3" align="center"><span class="application">lwresd</span></th></tr>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<a accesskey="p" href="man.dnssec-verify.html">Prev</a>�</td>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<th width="60%" align="center">Manual pages</th>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<td width="20%" align="right">�<a accesskey="n" href="man.named.html">Next</a>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<a name="man.lwresd"></a><div class="titlepage"></div>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<p><span class="application">lwresd</span> — lightweight resolver daemon</p>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<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">-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">-m <em class="replaceable"><code>flag</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>] [<code class="option">-4</code>] [<code class="option">-6</code>]</p></div>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<p><span class="command"><strong>lwresd</strong></span>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye is the daemon providing name lookup
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye services to clients that use the BIND 9 lightweight resolver
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye library. It is essentially a stripped-down, caching-only name
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye server that answers queries using the BIND 9 lightweight
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye resolver protocol rather than the DNS protocol.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<p><span class="command"><strong>lwresd</strong></span>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye listens for resolver queries on a
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye UDP port on the IPv4 loopback interface, 127.0.0.1. This
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye means that <span class="command"><strong>lwresd</strong></span> can only be used by
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye processes running on the local machine. By default, UDP port
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye number 921 is used for lightweight resolver requests and
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Incoming lightweight resolver requests are decoded by the
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye server which then resolves them using the DNS protocol. When
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye the DNS lookup completes, <span class="command"><strong>lwresd</strong></span> encodes
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye the answers in the lightweight resolver format and returns
a937449043f1e649320ccb609d9d1de16f6a9208Knut Anders Hatlen them to the client that made the request.
a937449043f1e649320ccb609d9d1de16f6a9208Knut Anders Hatlen If <code class="filename">/etc/resolv.conf</code> contains any
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <code class="option">nameserver</code> entries, <span class="command"><strong>lwresd</strong></span>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye sends recursive DNS queries to those servers. This is similar
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye to the use of forwarders in a caching name server. If no
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <code class="option">nameserver</code> entries are present, or if
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye forwarding fails, <span class="command"><strong>lwresd</strong></span> resolves the
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye queries autonomously starting at the root name servers, using
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye a built-in list of root server hints.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<div class="variablelist"><dl class="variablelist">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Use IPv4 only even if the host machine is capable of IPv6.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <code class="option">-4</code> and <code class="option">-6</code> are mutually
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Use IPv6 only even if the host machine is capable of IPv4.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <code class="option">-4</code> and <code class="option">-6</code> are mutually
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<dt><span class="term">-c <em class="replaceable"><code>config-file</code></em></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Use <em class="replaceable"><code>config-file</code></em> as the
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye configuration file instead of the default,
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <code class="option">-c</code> can not be used with <code class="option">-C</code>.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<dt><span class="term">-C <em class="replaceable"><code>config-file</code></em></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Use <em class="replaceable"><code>config-file</code></em> as the
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye configuration file instead of the default,
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <code class="filename">/etc/resolv.conf</code>.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <code class="option">-C</code> can not be used with <code class="option">-c</code>.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<dt><span class="term">-d <em class="replaceable"><code>debug-level</code></em></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Set the daemon's debug level to <em class="replaceable"><code>debug-level</code></em>.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Debugging traces from <span class="command"><strong>lwresd</strong></span> become
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye more verbose as the debug level increases.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Run the server in the foreground (i.e. do not daemonize).
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Run the server in the foreground and force all logging
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<dt><span class="term">-i <em class="replaceable"><code>pid-file</code></em></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Use <em class="replaceable"><code>pid-file</code></em> as the
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye PID file instead of the default,
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <code class="filename">/var/run/lwresd/lwresd.pid</code>.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<dt><span class="term">-m <em class="replaceable"><code>flag</code></em></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Turn on memory usage debugging flags. Possible flags are
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <em class="replaceable"><code>usage</code></em>,
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <em class="replaceable"><code>trace</code></em>,
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <em class="replaceable"><code>record</code></em>,
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <em class="replaceable"><code>size</code></em>, and
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <em class="replaceable"><code>mctx</code></em>.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye These correspond to the ISC_MEM_DEBUGXXXX flags described in
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <code class="filename"><isc/mem.h></code>.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<dt><span class="term">-n <em class="replaceable"><code>#cpus</code></em></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Create <em class="replaceable"><code>#cpus</code></em> worker threads
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye to take advantage of multiple CPUs. If not specified,
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <span class="command"><strong>lwresd</strong></span> will try to determine the
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye number of CPUs present and create one thread per CPU.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye If it is unable to determine the number of CPUs, a
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye single worker thread will be created.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<dt><span class="term">-P <em class="replaceable"><code>port</code></em></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Listen for lightweight resolver queries on port
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <em class="replaceable"><code>port</code></em>. If
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye not specified, the default is port 921.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Send DNS lookups to port <em class="replaceable"><code>port</code></em>. If not
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye specified, the default is port 53. This provides a
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye way of testing the lightweight resolver daemon with a
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye name server that listens for queries on a non-standard
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye port number.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Write memory usage statistics to <code class="filename">stdout</code>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye This option is mainly of interest to BIND 9 developers
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye and may be removed or changed in a future release.
50203181d8c071cfd69cb197b5da0eda5c4d6372Jens Elkner<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye to <em class="replaceable"><code>directory</code></em> after
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye processing the command line arguments, but before
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye reading the configuration file.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye This option should be used in conjunction with the
50203181d8c071cfd69cb197b5da0eda5c4d6372Jens Elkner <code class="option">-u</code> option, as chrooting a process
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye running as root doesn't enhance security on most
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye systems; the way <code class="function">chroot(2)</code> is
50203181d8c071cfd69cb197b5da0eda5c4d6372Jens Elkner defined allows a process with root privileges to
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye escape a chroot jail.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<dt><span class="term">-u <em class="replaceable"><code>user</code></em></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye to <em class="replaceable"><code>user</code></em> after completing
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye privileged operations, such as creating sockets that
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye listen on privileged ports.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye Report the version number and exit.
50203181d8c071cfd69cb197b5da0eda5c4d6372Jens Elkner<div class="variablelist"><dl class="variablelist">
50203181d8c071cfd69cb197b5da0eda5c4d6372Jens Elkner<dt><span class="term"><code class="filename">/etc/resolv.conf</code></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye The default configuration file.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<dt><span class="term"><code class="filename">/var/run/lwresd.pid</code></span></dt>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye The default process-id file.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>,
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye <span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<table width="100%" summary="Navigation footer">
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<a accesskey="p" href="man.dnssec-verify.html">Prev</a>�</td>
4500b8a9d03f7278ff842af84d4bd8a955855146Knut Anders Hatlen<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch13.html">Up</a></td>
4500b8a9d03f7278ff842af84d4bd8a955855146Knut Anders Hatlen<td width="40%" align="right">�<a accesskey="n" href="man.named.html">Next</a>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<span class="application">dnssec-verify</span>�</td>
a937449043f1e649320ccb609d9d1de16f6a9208Knut Anders Hatlen<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<td width="40%" align="right" valign="top">�<span class="application">named</span>
5d829b1478759d50e47a4e15977e61a4df21c93bTrond Norbye<p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.11.0rc3</p>