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 defined during compilation, so a
23 configuration file is only needed when it is necessary to deviate from
24 those defaults. By default, the configuration file in /etc/systemd/
25 contains commented out entries showing the defaults as a guide to the
26 administrator. This file can be edited to create local overrides.
27
28 When packages need to customize the configuration, they can install
29 configuration snippets in /usr/lib/systemd/*.conf.d/ or
30 /usr/local/lib/systemd/*.conf.d/. The main configuration file is read
31 before any of the configuration directories, and has the lowest
32 precedence; entries in a file in any configuration directory override
33 entries in the single configuration file. Files in the *.conf.d/
34 configuration subdirectories are sorted by their filename in
35 lexicographic order, regardless of in which of the subdirectories they
36 reside. When multiple files specify the same option, for options which
37 accept just a single value, the entry in the file with the
38 lexicographically latest name takes precedence. For options which
39 accept a list of values, entries are collected as they occur in files
40 sorted lexicographically.
41
42 Files in /etc/ are reserved for the local administrator, who may use
43 this logic to override the configuration files installed by vendor
44 packages. It is recommended to prefix all filenames in those
45 subdirectories with a two-digit number and a dash, to simplify the
46 ordering of the files.
47
48 To disable a configuration file supplied by the vendor, the recommended
49 way is to place a symlink to /dev/null in the configuration directory
50 in /etc/, with the same filename as the vendor configuration file.
51
53 The following options are available in the [Resolve] section:
54
55 DNS=
56 A space-separated list of IPv4 and IPv6 addresses to use as system
57 DNS servers. Each address can optionally take a port number
58 separated with ":", a network interface name or index separated
59 with "%", and a Server Name Indication (SNI) separated with "#".
60 When IPv6 address is specified with a port number, then the address
61 must be in the square brackets. That is, the acceptable full
62 formats are "111.222.333.444:9953%ifname#example.com" for IPv4 and
63 "[1111:2222::3333]:9953%ifname#example.com" for IPv6. DNS requests
64 are sent to one of the listed DNS servers in parallel to suitable
65 per-link DNS servers acquired from systemd-networkd.service(8) or
66 set at runtime by external applications. For compatibility reasons,
67 if this setting is not specified, the DNS servers listed in
68 /etc/resolv.conf are used instead, if that file exists and any
69 servers are configured in it. This setting defaults to the empty
70 list.
71
72 FallbackDNS=
73 A space-separated list of IPv4 and IPv6 addresses to use as the
74 fallback DNS servers. Please see DNS= for acceptable format of
75 adddresses. Any per-link DNS servers obtained from systemd-
76 networkd.service(8) take precedence over this setting, as do any
77 servers set via DNS= above or /etc/resolv.conf. This setting is
78 hence only used if no other DNS server information is known. If
79 this option is not given, a compiled-in list of DNS servers is used
80 instead.
81
82 Domains=
83 A space-separated list of domains optionally prefixed with "~",
84 used for two distinct purposes described below. Defaults to the
85 empty list.
86
87 Any domains not prefixed with "~" are used as search suffixes when
88 resolving single-label hostnames (domain names which contain no
89 dot), in order to qualify them into fully-qualified domain names
90 (FQDNs). These "search domains" are strictly processed in the order
91 they are specified in, until the name with the suffix appended is
92 found. For compatibility reasons, if this setting is not specified,
93 the search domains listed in /etc/resolv.conf with the search
94 keyword are used instead, if that file exists and any domains are
95 configured in it.
96
97 The domains prefixed with "~" are called "routing domains". All
98 domains listed here (both search domains and routing domains after
99 removing the "~" prefix) define a search path that preferably
100 directs DNS queries to this interface. This search path has an
101 effect only when suitable per-link DNS servers are known. Such
102 servers may be defined through the DNS= setting (see above) and
103 dynamically at run time, for example from DHCP leases. If no
104 per-link DNS servers are known, routing domains have no effect.
105
106 Use the construct "~." (which is composed from "~" to indicate a
107 routing domain and "." to indicate the DNS root domain that is the
108 implied suffix of all DNS domains) to use the DNS servers defined
109 for this link preferably for all domains.
110
111 LLMNR=
112 Takes a boolean argument or "resolve". Controls Link-Local
113 Multicast Name Resolution support (RFC 4795[1]) on the local host.
114 If true, enables full LLMNR responder and resolver support. If
115 false, disables both. If set to "resolve", only resolution support
116 is enabled, but responding is disabled. Note that systemd-
117 networkd.service(8) also maintains per-link LLMNR settings. LLMNR
118 will be enabled on a link only if the per-link and the global
119 setting is on.
120
121 MulticastDNS=
122 Takes a boolean argument or "resolve". Controls Multicast DNS
123 support (RFC 6762[2]) on the local host. If true, enables full
124 Multicast DNS responder and resolver support. If false, disables
125 both. If set to "resolve", only resolution support is enabled, but
126 responding is disabled. Note that systemd-networkd.service(8) also
127 maintains per-link Multicast DNS settings. Multicast DNS will be
128 enabled on a link only if the per-link and the global setting is
129 on.
130
131 DNSSEC=
132 Takes a boolean argument or "allow-downgrade". If true all DNS
133 lookups are DNSSEC-validated locally (excluding LLMNR and Multicast
134 DNS). If the response to a lookup request is detected to be invalid
135 a lookup failure is returned to applications. Note that this mode
136 requires a DNS server that supports DNSSEC. If the DNS server does
137 not properly support DNSSEC all validations will fail. If set to
138 "allow-downgrade" DNSSEC validation is attempted, but if the server
139 does not support DNSSEC properly, DNSSEC mode is automatically
140 disabled. Note that this mode makes DNSSEC validation vulnerable to
141 "downgrade" attacks, where an attacker might be able to trigger a
142 downgrade to non-DNSSEC mode by synthesizing a DNS response that
143 suggests DNSSEC was not supported. If set to false, DNS lookups are
144 not DNSSEC validated.
145
146 Note that DNSSEC validation requires retrieval of additional DNS
147 data, and thus results in a small DNS look-up time penalty.
148
149 DNSSEC requires knowledge of "trust anchors" to prove data
150 integrity. The trust anchor for the Internet root domain is built
151 into the resolver, additional trust anchors may be defined with
152 dnssec-trust-anchors.d(5). Trust anchors may change at regular
153 intervals, and old trust anchors may be revoked. In such a case
154 DNSSEC validation is not possible until new trust anchors are
155 configured locally or the resolver software package is updated with
156 the new root trust anchor. In effect, when the built-in trust
157 anchor is revoked and DNSSEC= is true, all further lookups will
158 fail, as it cannot be proved anymore whether lookups are correctly
159 signed, or validly unsigned. If DNSSEC= is set to "allow-downgrade"
160 the resolver will automatically turn off DNSSEC validation in such
161 a case.
162
163 Client programs looking up DNS data will be informed whether
164 lookups could be verified using DNSSEC, or whether the returned
165 data could not be verified (either because the data was found
166 unsigned in the DNS, or the DNS server did not support DNSSEC or no
167 appropriate trust anchors were known). In the latter case it is
168 assumed that client programs employ a secondary scheme to validate
169 the returned DNS data, should this be required.
170
171 It is recommended to set DNSSEC= to true on systems where it is
172 known that the DNS server supports DNSSEC correctly, and where
173 software or trust anchor updates happen regularly. On other systems
174 it is recommended to set DNSSEC= to "allow-downgrade".
175
176 In addition to this global DNSSEC setting systemd-
177 networkd.service(8) also maintains per-link DNSSEC settings. For
178 system DNS servers (see above), only the global DNSSEC setting is
179 in effect. For per-link DNS servers the per-link setting is in
180 effect, unless it is unset in which case the global setting is used
181 instead.
182
183 Site-private DNS zones generally conflict with DNSSEC operation,
184 unless a negative (if the private zone is not signed) or positive
185 (if the private zone is signed) trust anchor is configured for
186 them. If "allow-downgrade" mode is selected, it is attempted to
187 detect site-private DNS zones using top-level domains (TLDs) that
188 are not known by the DNS root server. This logic does not work in
189 all private zone setups.
190
191 Defaults to "allow-downgrade"
192
193 DNSOverTLS=
194 Takes a boolean argument or "opportunistic". If true all
195 connections to the server will be encrypted. Note that this mode
196 requires a DNS server that supports DNS-over-TLS and has a valid
197 certificate. If the hostname was specified in DNS= by using the
198 format format "address#server_name" it is used to validate its
199 certificate and also to enable Server Name Indication (SNI) when
200 opening a TLS connection. Otherwise the certificate is checked
201 against the server's IP. If the DNS server does not support
202 DNS-over-TLS all DNS requests will fail.
203
204 When set to "opportunistic" DNS request are attempted to send
205 encrypted with DNS-over-TLS. If the DNS server does not support
206 TLS, DNS-over-TLS is disabled. Note that this mode makes
207 DNS-over-TLS vulnerable to "downgrade" attacks, where an attacker
208 might be able to trigger a downgrade to non-encrypted mode by
209 synthesizing a response that suggests DNS-over-TLS was not
210 supported. If set to false, DNS lookups are send over UDP.
211
212 Note that DNS-over-TLS requires additional data to be send for
213 setting up an encrypted connection, and thus results in a small DNS
214 look-up time penalty.
215
216 Note that in "opportunistic" mode the resolver is not capable of
217 authenticating the server, so it is vulnerable to
218 "man-in-the-middle" attacks.
219
220 In addition to this global DNSOverTLS setting systemd-
221 networkd.service(8) also maintains per-link DNSOverTLS settings.
222 For system DNS servers (see above), only the global DNSOverTLS
223 setting is in effect. For per-link DNS servers the per-link setting
224 is in effect, unless it is unset in which case the global setting
225 is used instead.
226
227 Defaults to off.
228
229 Cache=
230 Takes a boolean or "no-negative" as argument. If "yes" (the
231 default), resolving a domain name which already got queried earlier
232 will return the previous result as long as it is still valid, and
233 thus does not result in a new network request. Be aware that
234 turning off caching comes at a performance penalty, which is
235 particularly high when DNSSEC is used. If "no-negative", only
236 positive answers are cached.
237
238 Note that caching is turned off implicitly if the configured DNS
239 server is on a host-local IP address (such as 127.0.0.1 or ::1), in
240 order to avoid duplicate local caching.
241
242 DNSStubListener=
243 Takes a boolean argument or one of "udp" and "tcp". If "udp", a DNS
244 stub resolver will listen for UDP requests on address 127.0.0.53
245 port 53. If "tcp", the stub will listen for TCP requests on the
246 same address and port. If "yes" (the default), the stub listens for
247 both UDP and TCP requests. If "no", the stub listener is disabled.
248
249 Note that the DNS stub listener is turned off implicitly when its
250 listening address and port are already in use.
251
252 ReadEtcHosts=
253 Takes a boolean argument. If "yes" (the default), systemd-resolved
254 will read /etc/hosts, and try to resolve hosts or address by using
255 the entries in the file before sending query to DNS servers.
256
257 ResolveUnicastSingleLabel=
258 Takes a boolean argument. When false (the default),
259 systemd-resolved will not resolve A and AAAA queries for
260 single-label names over classic DNS. Note that such names may still
261 be resolved if search domains are specified (see Domains= above),
262 or using other mechanisms, in particular via LLMNR or from
263 /etc/hosts. When true, queries for single-label names will be
264 forwarded to global DNS servers even if no search domains are
265 defined.
266
267 This option is provided for compatibility with configurations where
268 public DNS servers are not used. Forwarding single-label names to
269 servers not under your control is not standard-conformant, see IAB
270 Statement[3], and may create a privacy and security risk.
271
273 systemd(1), systemd-resolved.service(8), systemd-networkd.service(8),
274 dnssec-trust-anchors.d(5), resolv.conf(4)
275
277 1. RFC 4795
278 https://tools.ietf.org/html/rfc4795
279
280 2. RFC 6762
281 https://tools.ietf.org/html/rfc6762
282
283 3. IAB Statement
284 https://www.iab.org/documents/correspondence-reports-documents/2013-2/iab-statement-dotless-domains-considered-harmful/
285
286
287
288systemd 246 RESOLVED.CONF(5)