1RESOLVED.CONF(5) resolved.conf RESOLVED.CONF(5)
2
3
4
6 resolved.conf, resolved.conf.d - Network Name Resolution configuration
7 files
8
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
19 These configuration files control local DNS and LLMNR name resolution.
20
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
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 "route-only domains". All
101 domains listed here (both search domains and route-only domains
102 after 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, route-only domains have no effect.
108
109 Use the construct "~." (which is composed from "~" to indicate a
110 route-only domain and "." to indicate the DNS root domain that is
111 the implied suffix of all DNS domains) to use the DNS servers
112 defined for this link preferably for all domains.
113
114 See "Protocols and Routing" in systemd-resolved.service(8) for
115 details of how search and route-only domains are used.
116
117 LLMNR=
118 Takes a boolean argument or "resolve". Controls Link-Local
119 Multicast Name Resolution support (RFC 4795[1]) on the local host.
120 If true, enables full LLMNR responder and resolver support. If
121 false, disables both. If set to "resolve", only resolution support
122 is enabled, but responding is disabled. Note that systemd-
123 networkd.service(8) also maintains per-link LLMNR settings. LLMNR
124 will be enabled on a link only if the per-link and the global
125 setting is on.
126
127 MulticastDNS=
128 Takes a boolean argument or "resolve". Controls Multicast DNS
129 support (RFC 6762[2]) on the local host. If true, enables full
130 Multicast DNS responder and resolver support. If false, disables
131 both. If set to "resolve", only resolution support is enabled, but
132 responding is disabled. Note that systemd-networkd.service(8) also
133 maintains per-link Multicast DNS settings. Multicast DNS will be
134 enabled on a link only if the per-link and the global setting is
135 on.
136
137 DNSSEC=
138 Takes a boolean argument or "allow-downgrade". If true all DNS
139 lookups are DNSSEC-validated locally (excluding LLMNR and Multicast
140 DNS). If the response to a lookup request is detected to be invalid
141 a lookup failure is returned to applications. Note that this mode
142 requires a DNS server that supports DNSSEC. If the DNS server does
143 not properly support DNSSEC all validations will fail. If set to
144 "allow-downgrade" DNSSEC validation is attempted, but if the server
145 does not support DNSSEC properly, DNSSEC mode is automatically
146 disabled. Note that this mode makes DNSSEC validation vulnerable to
147 "downgrade" attacks, where an attacker might be able to trigger a
148 downgrade to non-DNSSEC mode by synthesizing a DNS response that
149 suggests DNSSEC was not supported. If set to false, DNS lookups are
150 not DNSSEC validated.
151
152 Note that DNSSEC validation requires retrieval of additional DNS
153 data, and thus results in a small DNS look-up time penalty.
154
155 DNSSEC requires knowledge of "trust anchors" to prove data
156 integrity. The trust anchor for the Internet root domain is built
157 into the resolver, additional trust anchors may be defined with
158 dnssec-trust-anchors.d(5). Trust anchors may change at regular
159 intervals, and old trust anchors may be revoked. In such a case
160 DNSSEC validation is not possible until new trust anchors are
161 configured locally or the resolver software package is updated with
162 the new root trust anchor. In effect, when the built-in trust
163 anchor is revoked and DNSSEC= is true, all further lookups will
164 fail, as it cannot be proved anymore whether lookups are correctly
165 signed, or validly unsigned. If DNSSEC= is set to "allow-downgrade"
166 the resolver will automatically turn off DNSSEC validation in such
167 a case.
168
169 Client programs looking up DNS data will be informed whether
170 lookups could be verified using DNSSEC, or whether the returned
171 data could not be verified (either because the data was found
172 unsigned in the DNS, or the DNS server did not support DNSSEC or no
173 appropriate trust anchors were known). In the latter case it is
174 assumed that client programs employ a secondary scheme to validate
175 the returned DNS data, should this be required.
176
177 It is recommended to set DNSSEC= to true on systems where it is
178 known that the DNS server supports DNSSEC correctly, and where
179 software or trust anchor updates happen regularly. On other systems
180 it is recommended to set DNSSEC= to "allow-downgrade".
181
182 In addition to this global DNSSEC setting systemd-
183 networkd.service(8) also maintains per-link DNSSEC settings. For
184 system DNS servers (see above), only the global DNSSEC setting is
185 in effect. For per-link DNS servers the per-link setting is in
186 effect, unless it is unset in which case the global setting is used
187 instead.
188
189 Site-private DNS zones generally conflict with DNSSEC operation,
190 unless a negative (if the private zone is not signed) or positive
191 (if the private zone is signed) trust anchor is configured for
192 them. If "allow-downgrade" mode is selected, it is attempted to
193 detect site-private DNS zones using top-level domains (TLDs) that
194 are not known by the DNS root server. This logic does not work in
195 all private zone setups.
196
197 Defaults to "no".
198
199 DNSOverTLS=
200 Takes a boolean argument or "opportunistic". If true all
201 connections to the server will be encrypted. Note that this mode
202 requires a DNS server that supports DNS-over-TLS and has a valid
203 certificate. If the hostname was specified in DNS= by using the
204 format "address#server_name" it is used to validate its certificate
205 and also to enable Server Name Indication (SNI) when opening a TLS
206 connection. Otherwise the certificate is checked against the
207 server's IP. If the DNS server does not support DNS-over-TLS all
208 DNS requests will fail.
209
210 When set to "opportunistic" DNS request are attempted to send
211 encrypted with DNS-over-TLS. If the DNS server does not support
212 TLS, DNS-over-TLS is disabled. Note that this mode makes
213 DNS-over-TLS vulnerable to "downgrade" attacks, where an attacker
214 might be able to trigger a downgrade to non-encrypted mode by
215 synthesizing a response that suggests DNS-over-TLS was not
216 supported. If set to false, DNS lookups are send over UDP.
217
218 Note that DNS-over-TLS requires additional data to be send for
219 setting up an encrypted connection, and thus results in a small DNS
220 look-up time penalty.
221
222 Note that in "opportunistic" mode the resolver is not capable of
223 authenticating the server, so it is vulnerable to
224 "man-in-the-middle" attacks.
225
226 In addition to this global DNSOverTLS= setting systemd-
227 networkd.service(8) also maintains per-link DNSOverTLS= settings.
228 For system DNS servers (see above), only the global DNSOverTLS=
229 setting is in effect. For per-link DNS servers the per-link setting
230 is in effect, unless it is unset in which case the global setting
231 is used instead.
232
233 Defaults to "no".
234
235 Cache=
236 Takes a boolean or "no-negative" as argument. If "yes" (the
237 default), resolving a domain name which already got queried earlier
238 will return the previous result as long as it is still valid, and
239 thus does not result in a new network request. Be aware that
240 turning off caching comes at a performance penalty, which is
241 particularly high when DNSSEC is used. If "no-negative", only
242 positive answers are cached.
243
244 Note that caching is turned off by default for host-local DNS
245 servers. See CacheFromLocalhost= for details.
246
247 CacheFromLocalhost=
248 Takes a boolean as argument. If "no" (the default), and response
249 cames from host-local IP address (such as 127.0.0.1 or ::1), the
250 result wouldn't be cached in order to avoid potential duplicate
251 local caching.
252
253 DNSStubListener=
254 Takes a boolean argument or one of "udp" and "tcp". If "udp", a DNS
255 stub resolver will listen for UDP requests on addresses 127.0.0.53
256 and 127.0.0.54, port 53. If "tcp", the stub will listen for TCP
257 requests on the same addresses and port. If "yes" (the default),
258 the stub listens for both UDP and TCP requests. If "no", the stub
259 listener is disabled.
260
261 The DNS stub resolver on 127.0.0.53 provides the full feature set
262 of the local resolver, which includes offering LLMNR/MulticastDNS
263 resolution. The DNS stub resolver on 127.0.0.54 provides a more
264 limited resolver, that operates in "proxy" mode only, i.e. it will
265 pass most DNS messages relatively unmodified to the current
266 upstream DNS servers and back, but not try to process the messages
267 locally, and hence does not validate DNSSEC, or offer up
268 LLMNR/MulticastDNS. (It will translate to DNS-over-TLS
269 communication if needed however.)
270
271 Note that the DNS stub listener is turned off implicitly when its
272 listening address and port are already in use.
273
274 DNSStubListenerExtra=
275 Takes an IPv4 or IPv6 address to listen on. The address may be
276 optionally prefixed with a protocol name ("udp" or "tcp") separated
277 with ":". If the protocol is not specified, the service will listen
278 on both UDP and TCP. It may be also optionally suffixed by a
279 numeric port number with separator ":". When an IPv6 address is
280 specified with a port number, then the address must be in the
281 square brackets. If the port is not specified, then the service
282 uses port 53. Note that this is independent of the primary DNS stub
283 configured with DNSStubListener=, and only configures additional
284 sockets to listen on. This option can be specified multiple times.
285 If an empty string is assigned, then the all previous assignments
286 are cleared. Defaults to unset.
287
288 Examples:
289
290 DNSStubListenerExtra=192.168.10.10
291 DNSStubListenerExtra=2001:db8:0:f102::10
292 DNSStubListenerExtra=192.168.10.11:9953
293 DNSStubListenerExtra=[2001:db8:0:f102::11]:9953
294 DNSStubListenerExtra=tcp:192.168.10.12
295 DNSStubListenerExtra=udp:2001:db8:0:f102::12
296 DNSStubListenerExtra=tcp:192.168.10.13:9953
297 DNSStubListenerExtra=udp:[2001:db8:0:f102::13]:9953
298
299
300 ReadEtcHosts=
301 Takes a boolean argument. If "yes" (the default), systemd-resolved
302 will read /etc/hosts, and try to resolve hosts or address by using
303 the entries in the file before sending query to DNS servers.
304
305 ResolveUnicastSingleLabel=
306 Takes a boolean argument. When false (the default),
307 systemd-resolved will not resolve A and AAAA queries for
308 single-label names over classic DNS. Note that such names may still
309 be resolved if search domains are specified (see Domains= above),
310 or using other mechanisms, in particular via LLMNR or from
311 /etc/hosts. When true, queries for single-label names will be
312 forwarded to global DNS servers even if no search domains are
313 defined.
314
315 This option is provided for compatibility with configurations where
316 public DNS servers are not used. Forwarding single-label names to
317 servers not under your control is not standard-conformant, see IAB
318 Statement[3], and may create a privacy and security risk.
319
321 systemd(1), systemd-resolved.service(8), systemd-networkd.service(8),
322 dnssec-trust-anchors.d(5), resolv.conf(5)
323
325 1. RFC 4795
326 https://tools.ietf.org/html/rfc4795
327
328 2. RFC 6762
329 https://tools.ietf.org/html/rfc6762
330
331 3. IAB Statement
332 https://www.iab.org/documents/correspondence-reports-documents/2013-2/iab-statement-dotless-domains-considered-harmful/
333
334
335
336systemd 253 RESOLVED.CONF(5)