|RESOLVCONF(8)||System Manager's Manual||RESOLVCONF(8)|
a framework for managing multiple DNS configurations
resolvconfmanages resolv.conf(5) files from multiple sources, such as DHCP and VPN clients. Traditionally, the host runs just one client and that updates /etc/resolv.conf. More modern systems frequently have wired and wireless interfaces and there is no guarantee both are on the same network. With the advent of VPN and other types of networking daemons, many things now contend for the contents of /etc/resolv.conf.
resolvconfsolves this by letting the daemon send their resolv.conf(5) file to
resolvconfvia stdin(4) with the argument
.protocol] instead of the filesystem.
resolvconfthen updates /etc/resolv.conf as it thinks best. When a local resolver other than libc is installed, such as dnsmasq(8) or named(8), then
resolvconfwill supply files that the resolver should be configured to include.
resolvconfassumes it has a job to do. In some situations
resolvconfneeds to act as a deterrent to writing to /etc/resolv.conf. Where this file cannot be made immutable or you just need to toggle this behaviour,
resolvconfcan be disabled by adding resolvconf=NO to resolvconf.conf(5).
resolvconfcan mark an interfaces resolv.conf as private. This means that the name servers listed in that resolv.conf are only used for queries against the domain/search listed in the same file. This only works when a local resolver other than libc is installed. See resolvconf.conf(5) for how to configure
resolvconfto use a local name server and how to remove the private marking.
resolvconfcan mark an interfaces resolv.conf as exclusive. Only the latest exclusive interface is used for processing, otherwise all are. When an interface goes down, it should then call
-dinterface.* arguments to delete the resolv.conf file(s) for all the protocols on the interface. Here are some options for the above commands:-
- Ignore non existent interfaces. Only really useful for deleting interfaces.
- Set the metric of the interface when adding it, default of 0. Lower metrics take precedence. This affects the default order of interfaces when listed.
- Marks the interface resolv.conf as private.
- Mark the interface resolv.conf as exclusive when adding, otherwise only use the latest exclusive interface.
resolvconfhas some more commands for general usage:-
- List the interfaces and protocols, optionally matching pattern, we have resolv.conf files for.
- List the resolv.conf files we have. If pattern is specified then we list the files for the interfaces and protocols that match it.
resolvconfto update all its subscribers.
resolvconfdoes not update the subscribers when adding a resolv.conf that matches what it already has for that interface.
- Echo the resolvconf version to stdout.
resolvconfalso has some commands designed to be used by it's subscribers and system startup:-
- Initialise the state directory
/run/resolvconf. This only needs to be
called if the initial system boot sequence does not automatically clean it
out; for example the state directory is moved somewhere other than
/var/run. If used, it should only be
called once as early in the system boot sequence as possible and before
resolvconfis used to add interfaces.
- Echo the command used to restart a service.
- If the service is running then restart it. If the service does not exist or is not running then zero is returned, otherwise the result of restarting the service.
- Echo variables DOMAINS, SEARCH and NAMESERVERS so that the subscriber can configure the resolver easily.
- Same as
-vexcept that only the information configured in resolvconf.conf(5) is set.
resolvconfto work effectively, it has to process the resolv.confs for the interfaces in the correct order.
resolvconffirst processes interfaces from the interface_order list, then interfaces without a metic and that match the dynamic_order list, then interfaces with a metric in order and finally the rest in the operating systems lexical order. See resolvconf.conf(5) for details on these lists. resolv.conf file registered on an interface:-
- Dynamic Host Configuration Protocol. Initial versions of
resolvconfdid not recommend a protocol tag be appended to the interface name. When the protocol is absent, it is assumed to be the DHCP protocol.
- Point-to-Point Protocol.
- IPv6 Router Advertisement.
- Dynamic Host Configuration Protocol, version 6.
- If the
-moption is not present then we use IF_METRIC for the metric.
- Marks the interface resolv.conf as private.
- Marks the interface resolv.conf as exclusive.
- Backup file of the original resolv.conf.
- Configuration file for
- Directory of subscribers which are run every time
resolvconfadds, deletes or updates.
- Directory of subscribers which are run after the libc subscriber is run.
- State directory for
resolvconfis called openresolv and is fully command line compatible with Debian's resolvconf, as written by Thomas Hood. Roy Marples <email@example.com> http://roy.marples.name/projects/openresolv
resolvconfdoes not validate any of the files given to it. When running a local resolver other than libc, you will need to configure it to include files that
resolvconfwill generate. You should consult resolvconf.conf(5) for instructions on how to configure your resolver.
|November 29, 2016||Linux 4.19.4-arch1-1-ARCH|