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/. Files in /etc/
30 are reserved for the local administrator, who may use this logic to
31 override the configuration files installed by vendor packages. The main
32 configuration file is read before any of the configuration directories,
33 and has the lowest precedence; entries in a file in any configuration
34 directory override entries in the single configuration file. Files in
35 the *.conf.d/ configuration subdirectories are sorted by their filename
36 in lexicographic order, regardless of which of the subdirectories they
37 reside in. When multiple files specify the same option, for options
38 which accept just a single value, the entry in the file with the
39 lexicographically latest name takes precedence. For options which
40 accept a list of values, entries are collected as they occur in files
41 sorted lexicographically. It is recommended to prefix all filenames in
42 those subdirectories with a two-digit number and a dash, to simplify
43 the ordering of the files.
44
45 To disable a configuration file supplied by the vendor, the recommended
46 way is to place a symlink to /dev/null in the configuration directory
47 in /etc/, with the same filename as the vendor configuration file.
48
50 The following options are available in the "[Resolve]" section:
51
52 DNS=
53 A space-separated list of IPv4 and IPv6 addresses to use as system
54 DNS servers. DNS requests are sent to one of the listed DNS servers
55 in parallel to suitable per-link DNS servers acquired from systemd-
56 networkd.service(8) or set at runtime by external applications. For
57 compatibility reasons, if this setting is not specified, the DNS
58 servers listed in /etc/resolv.conf are used instead, if that file
59 exists and any servers are configured in it. This setting defaults
60 to the empty list.
61
62 FallbackDNS=
63 A space-separated list of IPv4 and IPv6 addresses to use as the
64 fallback DNS servers. Any per-link DNS servers obtained from
65 systemd-networkd.service(8) take precedence over this setting, as
66 do any servers set via DNS= above or /etc/resolv.conf. This setting
67 is hence only used if no other DNS server information is known. If
68 this option is not given, a compiled-in list of DNS servers is used
69 instead.
70
71 Domains=
72 A space-separated list of domains. These domains are used as search
73 suffixes when resolving single-label host names (domain names which
74 contain no dot), in order to qualify them into fully-qualified
75 domain names (FQDNs). Search domains are strictly processed in the
76 order they are specified, until the name with the suffix appended
77 is found. For compatibility reasons, if this setting is not
78 specified, the search domains listed in /etc/resolv.conf are used
79 instead, if that file exists and any domains are configured in it.
80 This setting defaults to the empty list.
81
82 Specified domain names may optionally be prefixed with "~". In this
83 case they do not define a search path, but preferably direct DNS
84 queries for the indicated domains to the DNS servers configured
85 with the system DNS= setting (see above), in case additional,
86 suitable per-link DNS servers are known. If no per-link DNS servers
87 are known using the "~" syntax has no effect. Use the construct
88 "~." (which is composed of "~" to indicate a routing domain and
89 "." to indicate the DNS root domain that is the implied suffix of
90 all DNS domains) to use the system DNS server defined with DNS=
91 preferably for all domains.
92
93 LLMNR=
94 Takes a boolean argument or "resolve". Controls Link-Local
95 Multicast Name Resolution support (RFC 4795[1]) on the local host.
96 If true, enables full LLMNR responder and resolver support. If
97 false, disables both. If set to "resolve", only resolution support
98 is enabled, but responding is disabled. Note that systemd-
99 networkd.service(8) also maintains per-link LLMNR settings. LLMNR
100 will be enabled on a link only if the per-link and the global
101 setting is on.
102
103 MulticastDNS=
104 Takes a boolean argument or "resolve". Controls Multicast DNS
105 support (RFC 6762[2]) on the local host. If true, enables full
106 Multicast DNS responder and resolver support. If false, disables
107 both. If set to "resolve", only resolution support is enabled, but
108 responding is disabled. Note that systemd-networkd.service(8) also
109 maintains per-link Multicast DNS settings. Multicast DNS will be
110 enabled on a link only if the per-link and the global setting is
111 on.
112
113 DNSSEC=
114 Takes a boolean argument or "allow-downgrade". If true all DNS
115 lookups are DNSSEC-validated locally (excluding LLMNR and Multicast
116 DNS). If the response to a lookup request is detected to be invalid
117 a lookup failure is returned to applications. Note that this mode
118 requires a DNS server that supports DNSSEC. If the DNS server does
119 not properly support DNSSEC all validations will fail. If set to
120 "allow-downgrade" DNSSEC validation is attempted, but if the server
121 does not support DNSSEC properly, DNSSEC mode is automatically
122 disabled. Note that this mode makes DNSSEC validation vulnerable to
123 "downgrade" attacks, where an attacker might be able to trigger a
124 downgrade to non-DNSSEC mode by synthesizing a DNS response that
125 suggests DNSSEC was not supported. If set to false, DNS lookups are
126 not DNSSEC validated.
127
128 Note that DNSSEC validation requires retrieval of additional DNS
129 data, and thus results in a small DNS look-up time penalty.
130
131 DNSSEC requires knowledge of "trust anchors" to prove data
132 integrity. The trust anchor for the Internet root domain is built
133 into the resolver, additional trust anchors may be defined with
134 dnssec-trust-anchors.d(5). Trust anchors may change at regular
135 intervals, and old trust anchors may be revoked. In such a case
136 DNSSEC validation is not possible until new trust anchors are
137 configured locally or the resolver software package is updated with
138 the new root trust anchor. In effect, when the built-in trust
139 anchor is revoked and DNSSEC= is true, all further lookups will
140 fail, as it cannot be proved anymore whether lookups are correctly
141 signed, or validly unsigned. If DNSSEC= is set to "allow-downgrade"
142 the resolver will automatically turn off DNSSEC validation in such
143 a case.
144
145 Client programs looking up DNS data will be informed whether
146 lookups could be verified using DNSSEC, or whether the returned
147 data could not be verified (either because the data was found
148 unsigned in the DNS, or the DNS server did not support DNSSEC or no
149 appropriate trust anchors were known). In the latter case it is
150 assumed that client programs employ a secondary scheme to validate
151 the returned DNS data, should this be required.
152
153 It is recommended to set DNSSEC= to true on systems where it is
154 known that the DNS server supports DNSSEC correctly, and where
155 software or trust anchor updates happen regularly. On other systems
156 it is recommended to set DNSSEC= to "allow-downgrade".
157
158 In addition to this global DNSSEC setting systemd-
159 networkd.service(8) also maintains per-link DNSSEC settings. For
160 system DNS servers (see above), only the global DNSSEC setting is
161 in effect. For per-link DNS servers the per-link setting is in
162 effect, unless it is unset in which case the global setting is used
163 instead.
164
165 Site-private DNS zones generally conflict with DNSSEC operation,
166 unless a negative (if the private zone is not signed) or positive
167 (if the private zone is signed) trust anchor is configured for
168 them. If "allow-downgrade" mode is selected, it is attempted to
169 detect site-private DNS zones using top-level domains (TLDs) that
170 are not known by the DNS root server. This logic does not work in
171 all private zone setups.
172
173 Defaults to "allow-downgrade"
174
175 DNSOverTLS=
176 Takes false or "opportunistic". When set to "opportunistic" DNS
177 request are attempted to send encrypted with DNS-over-TLS. If the
178 DNS server does not support TLS, DNS-over-TLS is disabled. Note
179 that this mode makes DNS-over-TLS vulnerable to "downgrade"
180 attacks, where an attacker might be able to trigger a downgrade to
181 non-encrypted mode by synthesizing a response that suggests
182 DNS-over-TLS was not supported. If set to false, DNS lookups are
183 send over UDP.
184
185 Note that DNS-over-TLS requires additional data to be send for
186 setting up an encrypted connection, and thus results in a small DNS
187 look-up time penalty.
188
189 Note as the resolver is not capable of authenticating the server,
190 it is vulnerable for "man-in-the-middle" attacks.
191
192 In addition to this global DNSOverTLS setting systemd-
193 networkd.service(8) also maintains per-link DNSOverTLS settings.
194 For system DNS servers (see above), only the global DNSOverTLS
195 setting is in effect. For per-link DNS servers the per-link setting
196 is in effect, unless it is unset in which case the global setting
197 is used instead.
198
199 Defaults to off.
200
201 Cache=
202 Takes a boolean argument. If "yes" (the default), resolving a
203 domain name which already got queried earlier will return the
204 previous result as long as it is still valid, and thus does not
205 result in a new network request. Be aware that turning off caching
206 comes at a performance penalty, which is particularly high when
207 DNSSEC is used.
208
209 Note that caching is turned off implicitly if the configured DNS
210 server is on a host-local IP address (such as 127.0.0.1 or ::1), in
211 order to avoid duplicate local caching.
212
213 DNSStubListener=
214 Takes a boolean argument or one of "udp" and "tcp". If "udp" (the
215 default), a DNS stub resolver will listen for UDP requests on
216 address 127.0.0.53 port 53. If "tcp", the stub will listen for TCP
217 requests on the same address and port. If "yes", the stub listens
218 for both UDP and TCP requests. If "no", the stub listener is
219 disabled.
220
221 Note that the DNS stub listener is turned off implicitly when its
222 listening address and port are already in use.
223
225 systemd(1), systemd-resolved.service(8), systemd-networkd.service(8),
226 dnssec-trust-anchors.d(5), resolv.conf(4)
227
229 1. RFC 4795
230 https://tools.ietf.org/html/rfc4795
231
232 2. RFC 6762
233 https://tools.ietf.org/html/rfc6762
234
235
236
237systemd 239 RESOLVED.CONF(5)