1 .\" Copyright (c) 2007-2015 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
38 .Fl a Ar interface Ns Op Ar .protocol
42 .Fl d Ar interface Ns Op Ar .protocol
52 files from multiple sources, such as DHCP and VPN clients.
53 Traditionally, the host runs just one client and that updates
54 .Pa /etc/resolv.conf .
55 More modern systems frequently have wired and wireless interfaces and there is
56 no guarantee both are on the same network.
57 With the advent of VPN and other
58 types of networking daemons, many things now contend for the contents of
59 .Pa /etc/resolv.conf .
62 solves this by letting the daemon send their
69 .Fl a Ar interface Ns Op Ar .protocol
70 instead of the filesystem.
75 When a local resolver other than libc is installed, such as
81 will supply files that the resolver should be configured to include.
84 assumes it has a job to do.
87 needs to act as a deterrent to writing to
88 .Pa /etc/resolv.conf .
89 Where this file cannot be made immutable or you just need to toggle this
92 can be disabled by adding
93 .Sy resolvconf Ns = Ns NO
95 .Xr resolvconf.conf 5 .
98 can mark an interfaces
101 This means that the name servers listed in that
103 are only used for queries against the domain/search listed in the same file.
104 This only works when a local resolver other than libc is installed.
106 .Xr resolvconf.conf 5
109 to use a local name server.
112 can mark an interfaces
115 Only the latest exclusive interface is used for processing, otherwise all are.
117 When an interface goes down, it should then call
121 arguments to delete the
128 Here are some more options that
131 .Bl -tag -width indent
133 Initialise the state directory
135 This only needs to be called if the initial system boot sequence does not
136 automatically clean it out; for example the state directory is moved
139 If used, it should only be called once as early in the system boot sequence
140 as possible and before
142 is used to add interfaces.
144 Ignore non existant interfaces.
145 Only really useful for deleting interfaces.
147 List the interfaces and protocols, optionally matching
158 is specified then we list the files for the interfaces and protocols
161 Set the metric of the interface when adding it, default of 0.
162 Lower metrics take precedence.
163 This affects the default order of interfaces when listed.
171 to update all its subscribers.
173 does not update the subscribers when adding a resolv.conf that matches
174 what it already has for that interface.
178 as exclusive when adding, otherwise only use the latest exclusive interface.
182 also has some options designed to be used by its subscribers:-
183 .Bl -tag -width indent
185 Echo variables DOMAINS, SEARCH and NAMESERVERS so that the subscriber can
186 configure the resolver easily.
190 except that only the information configured in
191 .Xr resolvconf.conf 5
194 .Sh INTERFACE ORDERING
197 to work effectively, it has to process the resolv.confs for the interfaces
198 in the correct order.
200 first processes interfaces from the
202 list, then interfaces without a metic and that match the
204 list, then interfaces with a metric in order and finally the rest in
205 the operating systems lexical order.
207 .Xr resolvconf.conf 5
208 for details on these lists.
210 Here are some suggested protocol tags to use for each
212 file registered on an
213 .Ar interface Ns No :-
214 .Bl -tag -width indent
216 Dynamic Host Configuration Protocol.
221 tag be appended to the
224 When the protocol is absent, it is assumed to be the DHCP protocol.
226 Point-to-Point Protocol.
228 IPv6 Router Advertisement.
230 Dynamic Host Configuration Protocol, version 6.
232 .Sh IMPLEMENTATION NOTES
233 If a subscriber has the executable bit then it is executed otherwise it is
234 assumed to be a shell script and sourced into the current environment in a
236 This is done so that subscribers can remain fast, but are also not limited
237 to the shell language.
239 Portable subscribers should not use anything outside of
245 and others may not be available when booting.
246 Also, it would be unwise to assume any shell specific features.
252 option is not present then we use
266 .It Pa /etc/resolv.conf.bak
267 Backup file of the original resolv.conf.
268 .It Pa @SYSCONFDIR@/resolvconf.conf
269 Configuration file for
272 Directory of subscribers which are run every time
274 adds, deletes or updates.
275 .It Pa @LIBEXECDIR@/libc.d
276 Directory of subscribers which are run after the libc subscriber is run.
282 This implementation of
284 is called openresolv and is fully command line compatible with Debian's
285 resolvconf, as written by Thomas Hood.
288 .Xr resolvconf.conf 5 ,
292 .An Roy Marples Aq Mt roy@marples.name
294 Please report them to
295 .Lk http://roy.marples.name/projects/openresolv
298 does not validate any of the files given to it.
300 When running a local resolver other than libc, you will need to configure it
301 to include files that
305 .Xr resolvconf.conf 5
306 for instructions on how to configure your resolver.