1RESOLVED.CONF(5)                 resolved.conf                RESOLVED.CONF(5)
2
3
4

NAME

6       resolved.conf, resolved.conf.d - Network Name Resolution configuration
7       files
8

SYNOPSIS

10       /etc/systemd/resolved.conf
11
12       /etc/systemd/resolved.conf.d/*.conf
13
14       /run/systemd/resolved.conf.d/*.conf
15
16       /usr/lib/systemd/resolved.conf.d/*.conf
17

DESCRIPTION

19       These configuration files control local DNS and LLMNR name resolution.
20

CONFIGURATION DIRECTORIES AND PRECEDENCE

22       The default configuration is set during compilation, so configuration
23       is only needed when it is necessary to deviate from those defaults.
24       Initially, the main configuration file in /etc/systemd/ contains
25       commented out entries showing the defaults as a guide to the
26       administrator. Local overrides can be created by editing this file or
27       by creating drop-ins, as described below. Using drop-ins for local
28       configuration is recommended over modifications to the main
29       configuration file.
30
31       In addition to the "main" configuration file, drop-in configuration
32       snippets are read from /usr/lib/systemd/*.conf.d/,
33       /usr/local/lib/systemd/*.conf.d/, and /etc/systemd/*.conf.d/. Those
34       drop-ins have higher precedence and override the main configuration
35       file. Files in the *.conf.d/ configuration subdirectories are sorted by
36       their filename in lexicographic order, regardless of in which of the
37       subdirectories they reside. When multiple files specify the same
38       option, for options which accept just a single value, the entry in the
39       file sorted last takes precedence, and for options which accept a list
40       of values, entries are collected as they occur in the sorted files.
41
42       When packages need to customize the configuration, they can install
43       drop-ins under /usr/. Files in /etc/ are reserved for the local
44       administrator, who may use this logic to override the configuration
45       files installed by vendor packages. Drop-ins have to be used to
46       override package drop-ins, since the main configuration file has lower
47       precedence. It is recommended to prefix all filenames in those
48       subdirectories with a two-digit number and a dash, to simplify the
49       ordering of the files.
50
51       To disable a configuration file supplied by the vendor, the recommended
52       way is to place a symlink to /dev/null in the configuration directory
53       in /etc/, with the same filename as the vendor configuration file.
54

OPTIONS

56       The following options are available in the [Resolve] section:
57
58       DNS=
59           A space-separated list of IPv4 and IPv6 addresses to use as system
60           DNS servers. Each address can optionally take a port number
61           separated with ":", a network interface name or index separated
62           with "%", and a Server Name Indication (SNI) separated with "#".
63           When IPv6 address is specified with a port number, then the address
64           must be in the square brackets. That is, the acceptable full
65           formats are "111.222.333.444:9953%ifname#example.com" for IPv4 and
66           "[1111:2222::3333]:9953%ifname#example.com" for IPv6. DNS requests
67           are sent to one of the listed DNS servers in parallel to suitable
68           per-link DNS servers acquired from systemd-networkd.service(8) or
69           set at runtime by external applications. For compatibility reasons,
70           if this setting is not specified, the DNS servers listed in
71           /etc/resolv.conf are used instead, if that file exists and any
72           servers are configured in it. This setting defaults to the empty
73           list.
74
75       FallbackDNS=
76           A space-separated list of IPv4 and IPv6 addresses to use as the
77           fallback DNS servers. Please see DNS= for acceptable format of
78           addresses. Any per-link DNS servers obtained from systemd-
79           networkd.service(8) take precedence over this setting, as do any
80           servers set via DNS= above or /etc/resolv.conf. This setting is
81           hence only used if no other DNS server information is known. If
82           this option is not given, a compiled-in list of DNS servers is used
83           instead.
84
85       Domains=
86           A space-separated list of domains optionally prefixed with "~",
87           used for two distinct purposes described below. Defaults to the
88           empty list.
89
90           Any domains not prefixed with "~" are used as search suffixes when
91           resolving single-label hostnames (domain names which contain no
92           dot), in order to qualify them into fully-qualified domain names
93           (FQDNs). These "search domains" are strictly processed in the order
94           they are specified in, until the name with the suffix appended is
95           found. For compatibility reasons, if this setting is not specified,
96           the search domains listed in /etc/resolv.conf with the search
97           keyword are used instead, if that file exists and any domains are
98           configured in it.
99
100           The domains prefixed with "~" are called "routing domains". All
101           domains listed here (both search domains and routing domains after
102           removing the "~" prefix) define a search path that preferably
103           directs DNS queries to this interface. This search path has an
104           effect only when suitable per-link DNS servers are known. Such
105           servers may be defined through the DNS= setting (see above) and
106           dynamically at run time, for example from DHCP leases. If no
107           per-link DNS servers are known, routing domains have no effect.
108
109           Use the construct "~."  (which is composed from "~" to indicate a
110           routing domain and "."  to indicate the DNS root domain that is the
111           implied suffix of all DNS domains) to use the DNS servers defined
112           for this link preferably for all domains.
113
114       LLMNR=
115           Takes a boolean argument or "resolve". Controls Link-Local
116           Multicast Name Resolution support (RFC 4795[1]) on the local host.
117           If true, enables full LLMNR responder and resolver support. If
118           false, disables both. If set to "resolve", only resolution support
119           is enabled, but responding is disabled. Note that systemd-
120           networkd.service(8) also maintains per-link LLMNR settings. LLMNR
121           will be enabled on a link only if the per-link and the global
122           setting is on.
123
124       MulticastDNS=
125           Takes a boolean argument or "resolve". Controls Multicast DNS
126           support (RFC 6762[2]) on the local host. If true, enables full
127           Multicast DNS responder and resolver support. If false, disables
128           both. If set to "resolve", only resolution support is enabled, but
129           responding is disabled. Note that systemd-networkd.service(8) also
130           maintains per-link Multicast DNS settings. Multicast DNS will be
131           enabled on a link only if the per-link and the global setting is
132           on.
133
134       DNSSEC=
135           Takes a boolean argument or "allow-downgrade". If true all DNS
136           lookups are DNSSEC-validated locally (excluding LLMNR and Multicast
137           DNS). If the response to a lookup request is detected to be invalid
138           a lookup failure is returned to applications. Note that this mode
139           requires a DNS server that supports DNSSEC. If the DNS server does
140           not properly support DNSSEC all validations will fail. If set to
141           "allow-downgrade" DNSSEC validation is attempted, but if the server
142           does not support DNSSEC properly, DNSSEC mode is automatically
143           disabled. Note that this mode makes DNSSEC validation vulnerable to
144           "downgrade" attacks, where an attacker might be able to trigger a
145           downgrade to non-DNSSEC mode by synthesizing a DNS response that
146           suggests DNSSEC was not supported. If set to false, DNS lookups are
147           not DNSSEC validated.
148
149           Note that DNSSEC validation requires retrieval of additional DNS
150           data, and thus results in a small DNS look-up time penalty.
151
152           DNSSEC requires knowledge of "trust anchors" to prove data
153           integrity. The trust anchor for the Internet root domain is built
154           into the resolver, additional trust anchors may be defined with
155           dnssec-trust-anchors.d(5). Trust anchors may change at regular
156           intervals, and old trust anchors may be revoked. In such a case
157           DNSSEC validation is not possible until new trust anchors are
158           configured locally or the resolver software package is updated with
159           the new root trust anchor. In effect, when the built-in trust
160           anchor is revoked and DNSSEC= is true, all further lookups will
161           fail, as it cannot be proved anymore whether lookups are correctly
162           signed, or validly unsigned. If DNSSEC= is set to "allow-downgrade"
163           the resolver will automatically turn off DNSSEC validation in such
164           a case.
165
166           Client programs looking up DNS data will be informed whether
167           lookups could be verified using DNSSEC, or whether the returned
168           data could not be verified (either because the data was found
169           unsigned in the DNS, or the DNS server did not support DNSSEC or no
170           appropriate trust anchors were known). In the latter case it is
171           assumed that client programs employ a secondary scheme to validate
172           the returned DNS data, should this be required.
173
174           It is recommended to set DNSSEC= to true on systems where it is
175           known that the DNS server supports DNSSEC correctly, and where
176           software or trust anchor updates happen regularly. On other systems
177           it is recommended to set DNSSEC= to "allow-downgrade".
178
179           In addition to this global DNSSEC setting systemd-
180           networkd.service(8) also maintains per-link DNSSEC settings. For
181           system DNS servers (see above), only the global DNSSEC setting is
182           in effect. For per-link DNS servers the per-link setting is in
183           effect, unless it is unset in which case the global setting is used
184           instead.
185
186           Site-private DNS zones generally conflict with DNSSEC operation,
187           unless a negative (if the private zone is not signed) or positive
188           (if the private zone is signed) trust anchor is configured for
189           them. If "allow-downgrade" mode is selected, it is attempted to
190           detect site-private DNS zones using top-level domains (TLDs) that
191           are not known by the DNS root server. This logic does not work in
192           all private zone setups.
193
194           Defaults to "no".
195
196       DNSOverTLS=
197           Takes a boolean argument or "opportunistic". If true all
198           connections to the server will be encrypted. Note that this mode
199           requires a DNS server that supports DNS-over-TLS and has a valid
200           certificate. If the hostname was specified in DNS= by using the
201           format "address#server_name" it is used to validate its certificate
202           and also to enable Server Name Indication (SNI) when opening a TLS
203           connection. Otherwise the certificate is checked against the
204           server's IP. If the DNS server does not support DNS-over-TLS all
205           DNS requests will fail.
206
207           When set to "opportunistic" DNS request are attempted to send
208           encrypted with DNS-over-TLS. If the DNS server does not support
209           TLS, DNS-over-TLS is disabled. Note that this mode makes
210           DNS-over-TLS vulnerable to "downgrade" attacks, where an attacker
211           might be able to trigger a downgrade to non-encrypted mode by
212           synthesizing a response that suggests DNS-over-TLS was not
213           supported. If set to false, DNS lookups are send over UDP.
214
215           Note that DNS-over-TLS requires additional data to be send for
216           setting up an encrypted connection, and thus results in a small DNS
217           look-up time penalty.
218
219           Note that in "opportunistic" mode the resolver is not capable of
220           authenticating the server, so it is vulnerable to
221           "man-in-the-middle" attacks.
222
223           In addition to this global DNSOverTLS= setting systemd-
224           networkd.service(8) also maintains per-link DNSOverTLS= settings.
225           For system DNS servers (see above), only the global DNSOverTLS=
226           setting is in effect. For per-link DNS servers the per-link setting
227           is in effect, unless it is unset in which case the global setting
228           is used instead.
229
230           Defaults to "no".
231
232       Cache=
233           Takes a boolean or "no-negative" as argument. If "yes" (the
234           default), resolving a domain name which already got queried earlier
235           will return the previous result as long as it is still valid, and
236           thus does not result in a new network request. Be aware that
237           turning off caching comes at a performance penalty, which is
238           particularly high when DNSSEC is used. If "no-negative", only
239           positive answers are cached.
240
241           Note that caching is turned off by default for host-local DNS
242           servers. See CacheFromLocalhost= for details.
243
244       CacheFromLocalhost=
245           Takes a boolean as argument. If "no" (the default), and response
246           cames from host-local IP address (such as 127.0.0.1 or ::1), the
247           result wouldn't be cached in order to avoid potential duplicate
248           local caching.
249
250       DNSStubListener=
251           Takes a boolean argument or one of "udp" and "tcp". If "udp", a DNS
252           stub resolver will listen for UDP requests on addresses 127.0.0.53
253           and 127.0.0.54, port 53. If "tcp", the stub will listen for TCP
254           requests on the same addresses and port. If "yes" (the default),
255           the stub listens for both UDP and TCP requests. If "no", the stub
256           listener is disabled.
257
258           The DNS stub resolver on 127.0.0.53 provides the full feature set
259           of the local resolver, which includes offering LLMNR/MulticastDNS
260           resolution. The DNS stub resolver on 127.0.0.54 provides a more
261           limited resolver, that operates in "proxy" mode only, i.e. it will
262           pass most DNS messages relatively unmodified to the current
263           upstream DNS servers and back, but not try to process the messages
264           locally, and hence does not validate DNSSEC, or offer up
265           LLMNR/MulticastDNS. (It will translate to DNS-over-TLS
266           communication if needed however.)
267
268           Note that the DNS stub listener is turned off implicitly when its
269           listening address and port are already in use.
270
271       DNSStubListenerExtra=
272           Takes an IPv4 or IPv6 address to listen on. The address may be
273           optionally prefixed with a protocol name ("udp" or "tcp") separated
274           with ":". If the protocol is not specified, the service will listen
275           on both UDP and TCP. It may be also optionally suffixed by a
276           numeric port number with separator ":". When an IPv6 address is
277           specified with a port number, then the address must be in the
278           square brackets. If the port is not specified, then the service
279           uses port 53. Note that this is independent of the primary DNS stub
280           configured with DNSStubListener=, and only configures additional
281           sockets to listen on. This option can be specified multiple times.
282           If an empty string is assigned, then the all previous assignments
283           are cleared. Defaults to unset.
284
285           Examples:
286
287               DNSStubListenerExtra=192.168.10.10
288               DNSStubListenerExtra=2001:db8:0:f102::10
289               DNSStubListenerExtra=192.168.10.11:9953
290               DNSStubListenerExtra=[2001:db8:0:f102::11]:9953
291               DNSStubListenerExtra=tcp:192.168.10.12
292               DNSStubListenerExtra=udp:2001:db8:0:f102::12
293               DNSStubListenerExtra=tcp:192.168.10.13:9953
294               DNSStubListenerExtra=udp:[2001:db8:0:f102::13]:9953
295
296
297       ReadEtcHosts=
298           Takes a boolean argument. If "yes" (the default), systemd-resolved
299           will read /etc/hosts, and try to resolve hosts or address by using
300           the entries in the file before sending query to DNS servers.
301
302       ResolveUnicastSingleLabel=
303           Takes a boolean argument. When false (the default),
304           systemd-resolved will not resolve A and AAAA queries for
305           single-label names over classic DNS. Note that such names may still
306           be resolved if search domains are specified (see Domains= above),
307           or using other mechanisms, in particular via LLMNR or from
308           /etc/hosts. When true, queries for single-label names will be
309           forwarded to global DNS servers even if no search domains are
310           defined.
311
312           This option is provided for compatibility with configurations where
313           public DNS servers are not used. Forwarding single-label names to
314           servers not under your control is not standard-conformant, see IAB
315           Statement[3], and may create a privacy and security risk.
316

SEE ALSO

318       systemd(1), systemd-resolved.service(8), systemd-networkd.service(8),
319       dnssec-trust-anchors.d(5), resolv.conf(5)
320

NOTES

322        1. RFC 4795
323           https://tools.ietf.org/html/rfc4795
324
325        2. RFC 6762
326           https://tools.ietf.org/html/rfc6762
327
328        3. IAB Statement
329           https://www.iab.org/documents/correspondence-reports-documents/2013-2/iab-statement-dotless-domains-considered-harmful/
330
331
332
333systemd 251                                                   RESOLVED.CONF(5)
Impressum