1 .\" Copyright (c) 2007-2009 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
30 .Nd a framework for managing multiple DNS configurations
37 .Fl a Ar interface No < Ns Pa file
49 files from multiple sources, such as DHCP and VPN clients.
50 Traditionally, the host runs just one client and that updates
51 .Pa /etc/resolv.conf .
52 More modern systems frequently have wired and wireless interfaces and there is
53 no guarantee both are on the same network.
54 With the advent of VPN and other
55 types of networking daemons, many things now contend for the contents of
56 .Pa /etc/resolv.conf .
59 solves this by letting the daemon send their
67 instead of the filesystem.
72 When a local resolver other than libc is installed, such as
78 will supply files that the resolver should be configured to include.
81 can mark an interfaces
84 This means that the name servers listed in that
86 are only used for queries against the domain/search listed in the same file.
87 This only works when a local resolver other than libc is installed.
92 to use a local name server.
94 When an interface goes down, it should then call
98 arguments to delete the
103 Here are some more options that
106 .Bl -tag -width indent
108 Initialise the state directory
110 This only needs to be called if the initial system boot sequence does not
111 automatically clean it out; for example the state directory is moved
114 If used, it should only be called once as early in the system boot sequence
115 as possible and before
117 is used to add interfaces.
119 Ignore non existant interfaces.
120 Only really useful for deleting interfaces.
122 List the interfaces, optionally matching
133 is specified then we list the files for the interfaces that match it.
135 Set the metric of the interface when adding it, default of 0.
136 Lower metrics take precedence.
137 This affects the default order of interfaces when listed.
145 to update all it's subscribers.
147 does not update the subscribers when adding a resolv.conf that matches
148 what it already has for that interface.
152 also has some options designed to be used by it's subscribers:-
153 .Bl -tag -width indent
155 Echo variables DOMAINS, SEARCH and NAMESERVERS so that the subscriber can
156 configure the resolver easily.
158 .Sh INTERFACE ORDERING
161 to work effectively, it has to process the resolv.confs for the interfaces
162 in the correct order.
164 first processes interfaces from the
166 list, then interfaces without a metic and that match the
168 list, then interfaces with a metric in order and finally the rest in
169 the operating systems lexical order.
171 .Xr resolvconf.conf 5
172 for details on these lists.
173 .Sh IMPLEMENTATION NOTES
174 If a subscriber has the executable bit then it is executed otherwise it is
175 assumed to be a shell script and sourced into the current environment in a
177 This is done so that subscribers can remain fast, but are also not limited
178 to the shell language.
180 Portable subscribers should not use anything outside of
186 and others may not be available when booting.
187 Also, it would be unwise to assume any shell specific features.
193 option is not present then we use
203 .It Pa @SYSCONFDIR@/resolvconf.conf
204 Configuration file for
207 Directory of subscribers which are run every time
209 adds, deletes or updates.
210 .It Pa @LIBEXECDIR@/libc.d
211 Directory of subscribers which are run after the libc subscriber is run.
217 This implementation of
219 is called openresolv and is fully command line compatible with Debian's
220 resolvconf, as written by Thomas Hood.
223 does not validate any of the files given to it.
225 When running a local resolver other than libc, you will need to configure it
226 to include files that
230 .Xr resolvconf.conf 5
231 for instructions on how to configure your resolver.
234 .Xr resolvconf.conf 5 ,
238 .An Roy Marples Aq roy@marples.name
240 Please report them to http://roy.marples.name/projects/openresolv