1 .\" Copyright 2007-2008 Roy Marples
2 .\" All rights reserved
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .Nd a framework for managing multiple DNS configurations
32 .Fl a Ar interface No < Ns Pa file
44 files from multiple sources, such as DHCP and VPN clients.
45 Traditionally, the host runs just one client and that updates
46 .Pa /etc/resolv.conf .
47 More modern systems frequently have wired and wireless interfaces and there is
48 no guarantee both are on the same network. With the advent of VPN and other
49 types of networking daemons, many things now contend for the contents of
50 .Pa /etc/resolv.conf .
53 solves this by letting the daemon send their
61 instead of the filesystem.
66 When a local resolver other than libc is installed, such as
74 to use that and supply files that the resolver should be configured to include.
77 to configure the local resolver such that
79 files specifiying a domain only query the listed nameservers when resolving
80 for that domain. Otherwise the nameservers are treated as global nameservers.
81 This in turn means, that you can trivially configure nameservers for say
82 VPN domains. Example:-
83 .Bd -literal -offset indent
84 # resolv.conf from bge0
88 # resolv.conf from tap0
93 In this instance, nameserver 5.6.7.8 will only handle requests for bar.org
94 and nameserver 1.2.3.4 will handle everything else.
96 When an interface goes down, it should then call
100 arguments to delete the
105 Here are some more options that
108 .Bl -tag -width indent
110 Ignore non existant interfaces. Only really useful for deleting interfaces.
112 List the interfaces, optionally matching
122 is specified then we list the files for the interfaces that match it.
126 to update all it's helpers.
130 also has some options designed to be used by it's helpers:-
131 .Bl -tag -width indent
132 .It Fl s Ar service Ar command ...
137 Normally this is something like
138 .Ar resolvconf -s named restart .
139 We have this command, so the helpers don't have to know too much about the
140 operating system on the host.
142 Echo variables NEWDOMAIN, NEWSEARCH and NEWNS so that the helper can configure
147 .It Pa @VARBASE@/run/resolvconf
148 Directory that holds the data for
153 .Pa @VARBASE@/run/resolvconf/resolv.conf
154 to support a read only
156 .It Pa @SYSCONFDIR@/update.d
157 Directory of the helper scripts which are run every time
159 adds, deletes or updates.
160 .It Pa @SYSCONFDIR@/update-libc.d
161 Directory of helper scripts which are run after the libc helper script is run.
162 .It Pa @SYSCONFDIR@/interface-order
163 Determines the order in which nameserver information records are processed
165 .It Pa @SYSCONFDIR@/resolv.conf.d/base
166 Contains basic resolver information which is included in
168 even when no interfaces are configured.
169 .It Pa @SYSCONFDIR@/resolv.conf.d/head
170 File to be prepended to
171 .Pa /etc/resolv.conf .
172 Normally this is just a comment line.
173 .It Pa @SYSCONFDIR@/resolv.conf.d/tail
174 File to be appended to
175 .Pa /etc/resolv.conf .
178 This implementation of
180 is called openresolv and is fully command line compatible with Debians
181 resolvconf, as written by Thomas Hood, on which openresolv is based.
182 openresolv also shares a similar directory structure with the Debian version,
183 but the included helpers are not compatible.
185 The Debian version only works with bash and other GNU userland tools, whereas
186 openresolv works with a POSIX shell and userland tools.
189 does not validate any of the files given to it.
191 When running a local resolver other than libc, you will need to configure it
192 to include files that
194 will generate. You should consult the comment section in the helper script
195 for your resolver found in @SYSCONFDIR@/update.d for instructions
204 .An "Roy Marples" Aq roy@marples.name
206 Please report them to http://bugs.marples.name