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 "allow-downgrade".
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 format "address#server_name" it is used to validate its
202           certificate and also to enable Server Name Indication (SNI) when
203           opening a TLS connection. Otherwise the certificate is checked
204           against the server's IP. If the DNS server does not support
205           DNS-over-TLS all 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 off.
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 address 127.0.0.53
253           port 53. If "tcp", the stub will listen for TCP requests on the
254           same address and port. If "yes" (the default), the stub listens for
255           both UDP and TCP requests. If "no", the stub listener is disabled.
256
257           Note that the DNS stub listener is turned off implicitly when its
258           listening address and port are already in use.
259
260       DNSStubListenerExtra=
261           Takes an IPv4 or IPv6 address to listen on. The address may be
262           optionally prefixed with a protocol name ("udp" or "tcp") separated
263           with ":". If the protocol is not specified, the service will listen
264           on both UDP and TCP. It may be also optionally suffixed by a
265           numeric port number with separator ":". When an IPv6 address is
266           specified with a port number, then the address must be in the
267           square brackets. If the port is not specified, then the service
268           uses port 53. Note that this is independent of the primary DNS stub
269           configured with DNSStubListener=, and only configures additional
270           sockets to listen on. This option can be specified multiple times.
271           If an empty string is assigned, then the all previous assignments
272           are cleared. Defaults to unset.
273
274           Examples:
275
276               DNSStubListenerExtra=192.168.10.10
277               DNSStubListenerExtra=2001:db8:0:f102::10
278               DNSStubListenerExtra=192.168.10.11:9953
279               DNSStubListenerExtra=[2001:db8:0:f102::11]:9953
280               DNSStubListenerExtra=tcp:192.168.10.12
281               DNSStubListenerExtra=udp:2001:db8:0:f102::12
282               DNSStubListenerExtra=tcp:192.168.10.13:9953
283               DNSStubListenerExtra=udp:[2001:db8:0:f102::13]:9953
284
285
286       ReadEtcHosts=
287           Takes a boolean argument. If "yes" (the default), systemd-resolved
288           will read /etc/hosts, and try to resolve hosts or address by using
289           the entries in the file before sending query to DNS servers.
290
291       ResolveUnicastSingleLabel=
292           Takes a boolean argument. When false (the default),
293           systemd-resolved will not resolve A and AAAA queries for
294           single-label names over classic DNS. Note that such names may still
295           be resolved if search domains are specified (see Domains= above),
296           or using other mechanisms, in particular via LLMNR or from
297           /etc/hosts. When true, queries for single-label names will be
298           forwarded to global DNS servers even if no search domains are
299           defined.
300
301           This option is provided for compatibility with configurations where
302           public DNS servers are not used. Forwarding single-label names to
303           servers not under your control is not standard-conformant, see IAB
304           Statement[3], and may create a privacy and security risk.
305

SEE ALSO

307       systemd(1), systemd-resolved.service(8), systemd-networkd.service(8),
308       dnssec-trust-anchors.d(5), resolv.conf(4)
309

NOTES

311        1. RFC 4795
312           https://tools.ietf.org/html/rfc4795
313
314        2. RFC 6762
315           https://tools.ietf.org/html/rfc6762
316
317        3. IAB Statement
318           https://www.iab.org/documents/correspondence-reports-documents/2013-2/iab-statement-dotless-domains-considered-harmful/
319
320
321
322systemd 248                                                   RESOLVED.CONF(5)
Impressum