xref: /openbsd-src/sbin/resolvd/resolvd.8 (revision f5291493f82d538e1c1c2f0b06fed2a3c1439aaf)
1*f5291493Sjmc.\"	$OpenBSD: resolvd.8,v 1.12 2023/02/21 07:47:24 jmc Exp $
257184814Sflorian.\"
357184814Sflorian.\" Copyright (c) 2021 Florian Obser <florian@openbsd.org>
457184814Sflorian.\"
557184814Sflorian.\" Permission to use, copy, modify, and distribute this software for any
657184814Sflorian.\" purpose with or without fee is hereby granted, provided that the above
757184814Sflorian.\" copyright notice and this permission notice appear in all copies.
857184814Sflorian.\"
957184814Sflorian.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1057184814Sflorian.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1157184814Sflorian.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1257184814Sflorian.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1357184814Sflorian.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1457184814Sflorian.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1557184814Sflorian.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1657184814Sflorian.\"
17*f5291493Sjmc.Dd $Mdocdate: February 21 2023 $
1857184814Sflorian.Dt RESOLVD 8
1957184814Sflorian.Os
2057184814Sflorian.Sh NAME
2157184814Sflorian.Nm resolvd
2257184814Sflorian.Nd a daemon to handle nameserver configuration
2357184814Sflorian.Sh SYNOPSIS
2457184814Sflorian.Nm
2557184814Sflorian.Op Fl dv
2657184814Sflorian.Sh DESCRIPTION
2757184814Sflorian.Nm
2857184814Sflorianhandles the contents of
2997962418Sderaadt.Pa /etc/resolv.conf ,
3097962418Sderaadtwhich contains details of the system's DNS nameservers, and is
3197962418Sderaadtread by the resolver routines in the C library.
32548f8d02SderaadtNameservers are learned from various sources, incorporated in a priority
33548f8d02Sderaadtorder, then user-edited information found in the pre-existing file is
34548f8d02Sderaadtre-appended.
3597962418Sderaadt.Pp
3697962418Sderaadt.Nm
3797962418Sderaadtchecks whether
3857184814Sflorian.Xr unwind 8
39*f5291493Sjmcis running and, if so, places a nameserver line at the top
40*f5291493Sjmcto cause local resolution:
4197962418Sderaadt.Pp
4257184814Sflorian.Dl nameserver 127.0.0.1
4397962418Sderaadt.Pp
4457184814Sflorian.Nm
45548f8d02Sderaadtalso monitors the routing socket for proposals learned by
46548f8d02Sderaadt.Xr dhcpleased 8 ,
47f4fcb8cbSkn.Xr iked 8 ,
48548f8d02Sderaadt.Xr slaacd 8 ,
49548f8d02Sderaadtor network devices which natively learn DNS information such as
50d74bd450Sbket.Xr sppp 4
51d74bd450Sbketor
52548f8d02Sderaadt.Xr umb 4 .
53*f5291493SjmcProposals can be sent manually using the
54ffe655e4Sbenno.Xr route 8
55017a2980Sjmc.Cm nameserver
56017a2980Sjmccommand.
57*f5291493SjmcThe proposals are added in priority order,
58*f5291493Sjmcbut commented out if
59548f8d02Sderaadt.Xr unwind 8
60548f8d02Sderaadtis running.
61548f8d02Sderaadt.Pp
62548f8d02SderaadtAfter that,
63548f8d02Sderaadt.Nm
64548f8d02Sderaadtappends all user-edited lines found in the file.
65548f8d02Sderaadt.Pp
66548f8d02Sderaadt.Nm
67548f8d02Sderaadtalso notices if the
68548f8d02Sderaadt.Pa /etc/resolv.conf
69548f8d02Sderaadtfile is edited, and will rewrite the file, re-blending the various
70548f8d02Sderaadtpieces of information.
7157184814SflorianIt will also create
7257184814Sflorian.Pa /etc/resolv.conf
7357184814Sflorianif it does not exist or if it is empty.
7457184814Sflorian.Pp
7557184814SflorianThe options are as follows:
7657184814Sflorian.Bl -tag -width Ds
7757184814Sflorian.It Fl d
7857184814SflorianDo not daemonize.
7957184814SflorianIf this option is specified,
8057184814Sflorian.Nm
8157184814Sflorianwill run in the foreground and log to
8257184814Sflorian.Em stderr .
8357184814Sflorian.It Fl v
8457184814SflorianProduce more verbose output.
8557184814Sflorian.El
8657184814Sflorian.Sh SEE ALSO
8757184814Sflorian.Xr resolv.conf 5 ,
88548f8d02Sderaadt.Xr dhcpleased 8 ,
89ffe655e4Sbenno.Xr route 8 ,
9057184814Sflorian.Xr slaacd 8 ,
9157184814Sflorian.Xr unwind 8
9257184814Sflorian.Sh HISTORY
9357184814SflorianThe
9457184814Sflorian.Nm
9557184814Sflorianprogram first appeared in
9657184814Sflorian.Ox 6.9 .
97