]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/resolved.conf.xml
213be1d7b2c72c43e85d86ecdf9bababb1384943
[thirdparty/systemd.git] / man / resolved.conf.xml
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
5
6 <refentry id="resolved.conf" conditional='ENABLE_RESOLVE'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8 <refentryinfo>
9 <title>resolved.conf</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>resolved.conf</refentrytitle>
15 <manvolnum>5</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>resolved.conf</refname>
20 <refname>resolved.conf.d</refname>
21 <refpurpose>Network Name Resolution configuration files</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <para><filename>/etc/systemd/resolved.conf</filename></para>
26 <para><filename>/etc/systemd/resolved.conf.d/*.conf</filename></para>
27 <para><filename>/run/systemd/resolved.conf.d/*.conf</filename></para>
28 <para><filename>/usr/lib/systemd/resolved.conf.d/*.conf</filename></para>
29 </refsynopsisdiv>
30
31 <refsect1>
32 <title>Description</title>
33
34 <para>These configuration files control local DNS and LLMNR
35 name resolution.</para>
36
37 </refsect1>
38
39 <xi:include href="standard-conf.xml" xpointer="main-conf" />
40
41 <refsect1>
42 <title>Options</title>
43
44 <para>The following options are available in the <literal>[Resolve]</literal> section:</para>
45
46 <variablelist class='network-directives'>
47
48 <varlistentry>
49 <term><varname>DNS=</varname></term>
50 <listitem><para>A space-separated list of IPv4 and IPv6 addresses to use as system DNS servers. DNS requests
51 are sent to one of the listed DNS servers in parallel to suitable per-link DNS servers acquired from
52 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> or
53 set at runtime by external applications. For compatibility reasons, if this setting is not specified, the DNS
54 servers listed in <filename>/etc/resolv.conf</filename> are used instead, if that file exists and any servers
55 are configured in it. This setting defaults to the empty list.</para></listitem>
56 </varlistentry>
57
58 <varlistentry>
59 <term><varname>FallbackDNS=</varname></term>
60 <listitem><para>A space-separated list of IPv4 and IPv6 addresses to use as the fallback DNS servers. Any
61 per-link DNS servers obtained from
62 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
63 take precedence over this setting, as do any servers set via <varname>DNS=</varname> above or
64 <filename>/etc/resolv.conf</filename>. This setting is hence only used if no other DNS server information is
65 known. If this option is not given, a compiled-in list of DNS servers is used instead.</para></listitem>
66 </varlistentry>
67
68 <varlistentry>
69 <term><varname>Domains=</varname></term>
70 <listitem><para>A space-separated list of domains. These domains are used as search suffixes when resolving
71 single-label host names (domain names which contain no dot), in order to qualify them into fully-qualified
72 domain names (FQDNs). Search domains are strictly processed in the order they are specified, until the name
73 with the suffix appended is found. For compatibility reasons, if this setting is not specified, the search
74 domains listed in <filename>/etc/resolv.conf</filename> are used instead, if that file exists and any domains
75 are configured in it. This setting defaults to the empty list.</para>
76
77 <para>Specified domain names may optionally be prefixed with <literal>~</literal>. In this case they do not
78 define a search path, but preferably direct DNS queries for the indicated domains to the DNS servers configured
79 with the system <varname>DNS=</varname> setting (see above), in case additional, suitable per-link DNS servers
80 are known. If no per-link DNS servers are known using the <literal>~</literal> syntax has no effect. Use the
81 construct <literal>~.</literal> (which is composed of <literal>~</literal> to indicate a routing domain and
82 <literal>.</literal> to indicate the DNS root domain that is the implied suffix of all DNS domains) to use the
83 system DNS server defined with <varname>DNS=</varname> preferably for all domains.</para></listitem>
84 </varlistentry>
85
86 <varlistentry>
87 <term><varname>LLMNR=</varname></term>
88 <listitem><para>Takes a boolean argument or
89 <literal>resolve</literal>. Controls Link-Local Multicast Name
90 Resolution support (<ulink
91 url="https://tools.ietf.org/html/rfc4795">RFC 4795</ulink>) on
92 the local host. If true, enables full LLMNR responder and
93 resolver support. If false, disables both. If set to
94 <literal>resolve</literal>, only resolution support is enabled,
95 but responding is disabled. Note that
96 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
97 also maintains per-link LLMNR settings. LLMNR will be
98 enabled on a link only if the per-link and the
99 global setting is on.</para></listitem>
100 </varlistentry>
101
102 <varlistentry>
103 <term><varname>MulticastDNS=</varname></term>
104 <listitem><para>Takes a boolean argument or
105 <literal>resolve</literal>. Controls Multicast DNS support (<ulink
106 url="https://tools.ietf.org/html/rfc6762">RFC 6762</ulink>) on
107 the local host. If true, enables full Multicast DNS responder and
108 resolver support. If false, disables both. If set to
109 <literal>resolve</literal>, only resolution support is enabled,
110 but responding is disabled. Note that
111 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
112 also maintains per-link Multicast DNS settings. Multicast DNS will be
113 enabled on a link only if the per-link and the
114 global setting is on.</para></listitem>
115 </varlistentry>
116
117 <varlistentry>
118 <term><varname>DNSSEC=</varname></term>
119 <listitem><para>Takes a boolean argument or
120 <literal>allow-downgrade</literal>. If true all DNS lookups are
121 DNSSEC-validated locally (excluding LLMNR and Multicast
122 DNS). If the response to a lookup request is detected to be invalid
123 a lookup failure is returned to applications. Note that
124 this mode requires a DNS server that supports DNSSEC. If the
125 DNS server does not properly support DNSSEC all validations
126 will fail. If set to <literal>allow-downgrade</literal> DNSSEC
127 validation is attempted, but if the server does not support
128 DNSSEC properly, DNSSEC mode is automatically disabled. Note
129 that this mode makes DNSSEC validation vulnerable to
130 "downgrade" attacks, where an attacker might be able to
131 trigger a downgrade to non-DNSSEC mode by synthesizing a DNS
132 response that suggests DNSSEC was not supported. If set to
133 false, DNS lookups are not DNSSEC validated.</para>
134
135 <para>Note that DNSSEC validation requires retrieval of
136 additional DNS data, and thus results in a small DNS look-up
137 time penalty.</para>
138
139 <para>DNSSEC requires knowledge of "trust anchors" to prove
140 data integrity. The trust anchor for the Internet root domain
141 is built into the resolver, additional trust anchors may be
142 defined with
143 <citerefentry><refentrytitle>dnssec-trust-anchors.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
144 Trust anchors may change at regular intervals, and old trust
145 anchors may be revoked. In such a case DNSSEC validation is
146 not possible until new trust anchors are configured locally or
147 the resolver software package is updated with the new root
148 trust anchor. In effect, when the built-in trust anchor is
149 revoked and <varname>DNSSEC=</varname> is true, all further
150 lookups will fail, as it cannot be proved anymore whether
151 lookups are correctly signed, or validly unsigned. If
152 <varname>DNSSEC=</varname> is set to
153 <literal>allow-downgrade</literal> the resolver will
154 automatically turn off DNSSEC validation in such a case.</para>
155
156 <para>Client programs looking up DNS data will be informed
157 whether lookups could be verified using DNSSEC, or whether the
158 returned data could not be verified (either because the data
159 was found unsigned in the DNS, or the DNS server did not
160 support DNSSEC or no appropriate trust anchors were known). In
161 the latter case it is assumed that client programs employ a
162 secondary scheme to validate the returned DNS data, should
163 this be required.</para>
164
165 <para>It is recommended to set <varname>DNSSEC=</varname> to
166 true on systems where it is known that the DNS server supports
167 DNSSEC correctly, and where software or trust anchor updates
168 happen regularly. On other systems it is recommended to set
169 <varname>DNSSEC=</varname> to
170 <literal>allow-downgrade</literal>.</para>
171
172 <para>In addition to this global DNSSEC setting
173 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
174 also maintains per-link DNSSEC settings. For system DNS
175 servers (see above), only the global DNSSEC setting is in
176 effect. For per-link DNS servers the per-link
177 setting is in effect, unless it is unset in which case the
178 global setting is used instead.</para>
179
180 <para>Site-private DNS zones generally conflict with DNSSEC
181 operation, unless a negative (if the private zone is not
182 signed) or positive (if the private zone is signed) trust
183 anchor is configured for them. If
184 <literal>allow-downgrade</literal> mode is selected, it is
185 attempted to detect site-private DNS zones using top-level
186 domains (TLDs) that are not known by the DNS root server. This
187 logic does not work in all private zone setups.</para>
188
189 <para>Defaults to <literal>allow-downgrade</literal></para>
190 </listitem>
191 </varlistentry>
192
193 <varlistentry>
194 <term><varname>DNSOverTLS=</varname></term>
195 <listitem>
196 <para>Takes a boolean argument or <literal>opportunistic</literal>.
197 If true all connections to the server will be encrypted. Note that
198 this mode requires a DNS server that supports DNS-over-TLS and has
199 a valid certificate for it's IP. If the DNS server does not support
200 DNS-over-TLS all DNS requests will fail. When set to <literal>opportunistic</literal>
201 DNS request are attempted to send encrypted with DNS-over-TLS.
202 If the DNS server does not support TLS, DNS-over-TLS is disabled.
203 Note that this mode makes DNS-over-TLS vulnerable to "downgrade"
204 attacks, where an attacker might be able to trigger a downgrade
205 to non-encrypted mode by synthesizing a response that suggests
206 DNS-over-TLS was not supported. If set to false, DNS lookups
207 are send over UDP.</para>
208
209 <para>Note that DNS-over-TLS requires additional data to be
210 send for setting up an encrypted connection, and thus results
211 in a small DNS look-up time penalty.</para>
212
213 <para>Note as the resolver is not capable of authenticating
214 the server, it is vulnerable for "man-in-the-middle" attacks.</para>
215
216 <para>In addition to this global DNSOverTLS setting
217 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
218 also maintains per-link DNSOverTLS settings. For system DNS
219 servers (see above), only the global DNSOverTLS setting is in
220 effect. For per-link DNS servers the per-link
221 setting is in effect, unless it is unset in which case the
222 global setting is used instead.</para>
223
224 <para>Defaults to off.</para>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry>
229 <term><varname>Cache=</varname></term>
230 <listitem><para>Takes a boolean or <literal>no-negative</literal> as argument. If <literal>yes</literal> (the default), resolving a domain name
231 which already got queried earlier will return the previous result as long as it is still valid, and thus does
232 not result in a new network request. Be aware that turning off caching comes at a performance penalty, which
233 is particularly high when DNSSEC is used.</para>
234 If <literal>no-negative</literal>, only positive answers are cached.
235
236 <para>Note that caching is turned off implicitly if the configured DNS server is on a host-local IP address
237 (such as 127.0.0.1 or ::1), in order to avoid duplicate local caching.</para></listitem>
238 </varlistentry>
239
240 <varlistentry>
241 <term><varname>DNSStubListener=</varname></term>
242 <listitem><para>Takes a boolean argument or one of <literal>udp</literal> and <literal>tcp</literal>. If
243 <literal>udp</literal>, a DNS stub resolver will listen for UDP requests on address 127.0.0.53
244 port 53. If <literal>tcp</literal>, the stub will listen for TCP requests on the same address and port. If
245 <literal>yes</literal> (the default), the stub listens for both UDP and TCP requests. If <literal>no</literal>, the stub
246 listener is disabled.</para>
247
248 <para>Note that the DNS stub listener is turned off implicitly when its listening address and port are already
249 in use.</para></listitem>
250 </varlistentry>
251
252 <varlistentry>
253 <term><varname>ReadEtcHosts=</varname></term>
254 <listitem><para>Takes a boolean argument. If <literal>yes</literal> (the default), the DNS stub resolver will read
255 <filename>/etc/hosts</filename>, and try to resolve hosts or address by using the entries in the file before
256 sending query to DNS servers.</para></listitem>
257 </varlistentry>
258
259 </variablelist>
260 </refsect1>
261
262 <refsect1>
263 <title>See Also</title>
264 <para>
265 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
266 <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
267 <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
268 <citerefentry><refentrytitle>dnssec-trust-anchors.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
269 <citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>4</manvolnum></citerefentry>
270 </para>
271 </refsect1>
272
273 </refentry>