| 1 |
<?xml version='1.0'?> |
| 2 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 3 |
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ |
| 4 |
<!ENTITY % entities SYSTEM "custom-entities.ent" > |
| 5 |
%entities; |
| 6 |
]> |
| 7 |
<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
| 8 |
|
| 9 |
<refentry id="resolved.conf" conditional='ENABLE_RESOLVE' |
| 10 |
xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 11 |
<refentryinfo> |
| 12 |
<title>resolved.conf</title> |
| 13 |
<productname>systemd</productname> |
| 14 |
</refentryinfo> |
| 15 |
|
| 16 |
<refmeta> |
| 17 |
<refentrytitle>resolved.conf</refentrytitle> |
| 18 |
<manvolnum>5</manvolnum> |
| 19 |
</refmeta> |
| 20 |
|
| 21 |
<refnamediv> |
| 22 |
<refname>resolved.conf</refname> |
| 23 |
<refname>resolved.conf.d</refname> |
| 24 |
<refpurpose>Network Name Resolution configuration files</refpurpose> |
| 25 |
</refnamediv> |
| 26 |
|
| 27 |
<refsynopsisdiv> |
| 28 |
<para><simplelist> |
| 29 |
<member><filename>/etc/systemd/resolved.conf</filename></member> |
| 30 |
<member><filename>/run/systemd/resolved.conf</filename></member> |
| 31 |
<member><filename>/usr/local/lib/systemd/resolved.conf</filename></member> |
| 32 |
<member><filename>/usr/lib/systemd/resolved.conf</filename></member> |
| 33 |
<member><filename>/etc/systemd/resolved.conf.d/*.conf</filename></member> |
| 34 |
<member><filename>/run/systemd/resolved.conf.d/*.conf</filename></member> |
| 35 |
<member><filename>/usr/local/lib/systemd/resolved.conf.d/*.conf</filename></member> |
| 36 |
<member><filename>/usr/lib/systemd/resolved.conf.d/*.conf</filename></member> |
| 37 |
</simplelist></para> |
| 38 |
</refsynopsisdiv> |
| 39 |
|
| 40 |
<refsect1> |
| 41 |
<title>Description</title> |
| 42 |
|
| 43 |
<para>These configuration files control local DNS and LLMNR |
| 44 |
name resolution.</para> |
| 45 |
|
| 46 |
</refsect1> |
| 47 |
|
| 48 |
<xi:include href="standard-conf.xml" xpointer="main-conf" /> |
| 49 |
|
| 50 |
<refsect1> |
| 51 |
<title>Options</title> |
| 52 |
|
| 53 |
<para>The following options are available in the [Resolve] section:</para> |
| 54 |
|
| 55 |
<variablelist class='network-directives'> |
| 56 |
|
| 57 |
<varlistentry> |
| 58 |
<term><varname>DNS=</varname></term> |
| 59 |
<listitem><para>A space-separated list of IPv4 and IPv6 addresses to use as system DNS servers. Each address can |
| 60 |
optionally take a port number separated with <literal>:</literal>, a network interface name or index separated with |
| 61 |
<literal>%</literal>, and a Server Name Indication (SNI) separated with <literal>#</literal>. When IPv6 address is |
| 62 |
specified with a port number, then the address must be in the square brackets. That is, the acceptable full formats |
| 63 |
are <literal>111.222.333.444:9953%ifname#example.com</literal> for IPv4 and |
| 64 |
<literal>[1111:2222::3333]:9953%ifname#example.com</literal> for IPv6. DNS requests are sent to one of the listed |
| 65 |
DNS servers in parallel to suitable per-link DNS servers acquired from |
| 66 |
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> or |
| 67 |
set at runtime by external applications. For compatibility reasons, if this setting is not specified, the DNS |
| 68 |
servers listed in <filename>/etc/resolv.conf</filename> are used instead, if that file exists and any servers |
| 69 |
are configured in it. This setting defaults to the empty list.</para> |
| 70 |
|
| 71 |
<xi:include href="version-info.xml" xpointer="v213"/></listitem> |
| 72 |
</varlistentry> |
| 73 |
|
| 74 |
<varlistentry> |
| 75 |
<term><varname>FallbackDNS=</varname></term> |
| 76 |
<listitem><para>A space-separated list of IPv4 and IPv6 addresses to use as the fallback DNS servers. Please see |
| 77 |
<varname>DNS=</varname> for acceptable format of addresses. Any per-link DNS servers obtained from |
| 78 |
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 79 |
take precedence over this setting, as do any servers set via <varname>DNS=</varname> above or |
| 80 |
<filename>/etc/resolv.conf</filename>. This setting is hence only used if no other DNS server information is |
| 81 |
known. If this option is not given, a compiled-in list of DNS servers is used instead.</para> |
| 82 |
|
| 83 |
<xi:include href="version-info.xml" xpointer="v216"/></listitem> |
| 84 |
</varlistentry> |
| 85 |
|
| 86 |
<varlistentry> |
| 87 |
<term><varname>Domains=</varname></term> |
| 88 |
<listitem><para>A space-separated list of domains, optionally prefixed with <literal>~</literal>, |
| 89 |
used for two distinct purposes described below. Defaults to the empty list.</para> |
| 90 |
|
| 91 |
<para>Any domains <emphasis>not</emphasis> prefixed with <literal>~</literal> are used as search |
| 92 |
suffixes when resolving single-label hostnames (domain names which contain no dot), in order to |
| 93 |
qualify them into fully-qualified domain names (FQDNs). These "search domains" are strictly processed |
| 94 |
in the order they are specified in, until the name with the suffix appended is found. For |
| 95 |
compatibility reasons, if this setting is not specified, the search domains listed in |
| 96 |
<filename>/etc/resolv.conf</filename> with the <varname>search</varname> keyword are used instead, if |
| 97 |
that file exists and any domains are configured in it.</para> |
| 98 |
|
| 99 |
<para>The domains prefixed with <literal>~</literal> are called "route-only domains". All domains |
| 100 |
listed here (<emphasis>both search domains and route-only domains</emphasis> after removing the |
| 101 |
<literal>~</literal> prefix) define a search path that preferably directs DNS queries to this |
| 102 |
interface. This search path has an effect only when suitable per-link DNS servers are known. Such |
| 103 |
servers may be defined through the <varname>DNS=</varname> setting (see above) and dynamically at run |
| 104 |
time, for example from DHCP leases. If no per-link DNS servers are known, route-only domains have no |
| 105 |
effect.</para> |
| 106 |
|
| 107 |
<para>Use the construct <literal>~.</literal> (which is composed from <literal>~</literal> to |
| 108 |
indicate a route-only domain and <literal>.</literal> to indicate the DNS root domain that is the |
| 109 |
implied suffix of all DNS domains) to use the DNS servers defined for this link preferably for all |
| 110 |
domains.</para> |
| 111 |
|
| 112 |
<para>See "Protocols and Routing" in |
| 113 |
<citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 114 |
for details of how search and route-only domains are used.</para> |
| 115 |
|
| 116 |
<para>Note that configuring the MulticastDNS domain <literal>local</literal> as search or routing |
| 117 |
domain has the effect of routing lookups for this domain to classic unicast DNS. This may be used to |
| 118 |
provide compatibility with legacy installations that use this domain in a unicast DNS context, |
| 119 |
against the IANA assignment of this domain to pure MulticastDNS purposes. Search and routing domains |
| 120 |
are a unicast DNS concept, they <emphasis>cannot</emphasis> be used to resolve single-label lookups |
| 121 |
via MulticastDNS.</para> |
| 122 |
|
| 123 |
<xi:include href="version-info.xml" xpointer="v229"/> |
| 124 |
</listitem> |
| 125 |
</varlistentry> |
| 126 |
|
| 127 |
<varlistentry> |
| 128 |
<term><varname>LLMNR=</varname></term> |
| 129 |
<listitem><para>Takes a boolean argument or |
| 130 |
<literal>resolve</literal>. Controls Link-Local Multicast Name |
| 131 |
Resolution support (<ulink |
| 132 |
url="https://tools.ietf.org/html/rfc4795">RFC 4795</ulink>) on |
| 133 |
the local host. If true, enables full LLMNR responder and |
| 134 |
resolver support. If false, disables both. If set to |
| 135 |
<literal>resolve</literal>, only resolution support is enabled, |
| 136 |
but responding is disabled. Note that |
| 137 |
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 138 |
also maintains per-link LLMNR settings. LLMNR will be |
| 139 |
enabled on a link only if the per-link and the |
| 140 |
global setting is on.</para> |
| 141 |
|
| 142 |
<xi:include href="version-info.xml" xpointer="v216"/></listitem> |
| 143 |
</varlistentry> |
| 144 |
|
| 145 |
<varlistentry> |
| 146 |
<term><varname>MulticastDNS=</varname></term> |
| 147 |
<listitem><para>Takes a boolean argument or |
| 148 |
<literal>resolve</literal>. Controls Multicast DNS support (<ulink |
| 149 |
url="https://tools.ietf.org/html/rfc6762">RFC 6762</ulink>) on |
| 150 |
the local host. If true, enables full Multicast DNS responder and |
| 151 |
resolver support. If false, disables both. If set to |
| 152 |
<literal>resolve</literal>, only resolution support is enabled, |
| 153 |
but responding is disabled. Note that |
| 154 |
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 155 |
also maintains per-link Multicast DNS settings. Multicast DNS will be |
| 156 |
enabled on a link only if the per-link and the |
| 157 |
global setting is on.</para> |
| 158 |
|
| 159 |
<xi:include href="version-info.xml" xpointer="v234"/></listitem> |
| 160 |
</varlistentry> |
| 161 |
|
| 162 |
<varlistentry> |
| 163 |
<term><varname>DNSSEC=</varname></term> |
| 164 |
<listitem><para>Takes a boolean argument or <literal>allow-downgrade</literal>.</para> |
| 165 |
|
| 166 |
<para>If set to true, all DNS lookups are DNSSEC-validated locally (excluding LLMNR and Multicast |
| 167 |
DNS). If the response to a lookup request is detected to be invalid a lookup failure is returned to |
| 168 |
applications. Note that this mode requires a DNS server that supports DNSSEC. If the DNS server does |
| 169 |
not properly support DNSSEC all validations will fail.</para> |
| 170 |
|
| 171 |
<para>If set to <literal>allow-downgrade</literal>, DNSSEC validation is attempted, but if the server |
| 172 |
does not support DNSSEC properly, DNSSEC mode is automatically disabled. Note that this mode makes |
| 173 |
DNSSEC validation vulnerable to "downgrade" attacks, where an attacker might be able to trigger a |
| 174 |
downgrade to non-DNSSEC mode by synthesizing a DNS response that suggests DNSSEC was not |
| 175 |
supported.</para> |
| 176 |
|
| 177 |
<para>If set to false, DNS lookups are not DNSSEC validated.</para> |
| 178 |
|
| 179 |
<para>Note that DNSSEC validation requires retrieval of additional DNS data, and thus results in a |
| 180 |
small DNS lookup time penalty.</para> |
| 181 |
|
| 182 |
<para>DNSSEC requires knowledge of "trust anchors" to prove |
| 183 |
data integrity. The trust anchor for the Internet root domain |
| 184 |
is built into the resolver, additional trust anchors may be |
| 185 |
defined with |
| 186 |
<citerefentry><refentrytitle>dnssec-trust-anchors.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 187 |
Trust anchors may change at regular intervals, and old trust |
| 188 |
anchors may be revoked. In such a case DNSSEC validation is |
| 189 |
not possible until new trust anchors are configured locally or |
| 190 |
the resolver software package is updated with the new root |
| 191 |
trust anchor. In effect, when the built-in trust anchor is |
| 192 |
revoked and <varname>DNSSEC=</varname> is true, all further |
| 193 |
lookups will fail, as it cannot be proved anymore whether |
| 194 |
lookups are correctly signed, or validly unsigned. If |
| 195 |
<varname>DNSSEC=</varname> is set to |
| 196 |
<literal>allow-downgrade</literal> the resolver will |
| 197 |
automatically turn off DNSSEC validation in such a case.</para> |
| 198 |
|
| 199 |
<para>Client programs looking up DNS data will be informed |
| 200 |
whether lookups could be verified using DNSSEC, or whether the |
| 201 |
returned data could not be verified (either because the data |
| 202 |
was found unsigned in the DNS, or the DNS server did not |
| 203 |
support DNSSEC or no appropriate trust anchors were known). In |
| 204 |
the latter case, it is assumed that client programs employ a |
| 205 |
secondary scheme to validate the returned DNS data, should |
| 206 |
this be required.</para> |
| 207 |
|
| 208 |
<para>It is recommended to set <varname>DNSSEC=</varname> to |
| 209 |
true on systems where it is known that the DNS server supports |
| 210 |
DNSSEC correctly, and where software or trust anchor updates |
| 211 |
happen regularly. On other systems it is recommended to set |
| 212 |
<varname>DNSSEC=</varname> to |
| 213 |
<literal>allow-downgrade</literal>.</para> |
| 214 |
|
| 215 |
<para>In addition to this global DNSSEC setting |
| 216 |
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 217 |
also maintains per-link DNSSEC settings. For system DNS |
| 218 |
servers (see above), only the global DNSSEC setting is in |
| 219 |
effect. For per-link DNS servers the per-link |
| 220 |
setting is in effect, unless it is unset in which case the |
| 221 |
global setting is used instead.</para> |
| 222 |
|
| 223 |
<para>Site-private DNS zones generally conflict with DNSSEC |
| 224 |
operation, unless a negative (if the private zone is not |
| 225 |
signed) or positive (if the private zone is signed) trust |
| 226 |
anchor is configured for them. If |
| 227 |
<literal>allow-downgrade</literal> mode is selected, it is |
| 228 |
attempted to detect site-private DNS zones using top-level |
| 229 |
domains (TLDs) that are not known by the DNS root server. This |
| 230 |
logic does not work in all private zone setups.</para> |
| 231 |
|
| 232 |
<para>Defaults to <literal>&DEFAULT_DNSSEC_MODE;</literal>.</para> |
| 233 |
|
| 234 |
<xi:include href="version-info.xml" xpointer="v229"/> |
| 235 |
</listitem> |
| 236 |
</varlistentry> |
| 237 |
|
| 238 |
<varlistentry> |
| 239 |
<term><varname>DNSOverTLS=</varname></term> |
| 240 |
<listitem> |
| 241 |
<para>Takes a boolean argument or <literal>opportunistic</literal>. If |
| 242 |
true all connections to the server will be encrypted. Note that this |
| 243 |
mode requires a DNS server that supports DNS-over-TLS and has a valid |
| 244 |
certificate. If the hostname was specified in <varname>DNS=</varname> |
| 245 |
by using the format <literal>address#server_name</literal> it |
| 246 |
is used to validate its certificate and also to enable Server Name |
| 247 |
Indication (SNI) when opening a TLS connection. Otherwise |
| 248 |
the certificate is checked against the server's IP. |
| 249 |
If the DNS server does not support DNS-over-TLS all DNS requests will fail.</para> |
| 250 |
|
| 251 |
<para>When set to <literal>opportunistic</literal> |
| 252 |
DNS request are attempted to send encrypted with DNS-over-TLS. |
| 253 |
If the DNS server does not support TLS, DNS-over-TLS is disabled. |
| 254 |
Note that this mode makes DNS-over-TLS vulnerable to "downgrade" |
| 255 |
attacks, where an attacker might be able to trigger a downgrade |
| 256 |
to non-encrypted mode by synthesizing a response that suggests |
| 257 |
DNS-over-TLS was not supported. If set to false, DNS lookups |
| 258 |
are send over UDP.</para> |
| 259 |
|
| 260 |
<para>Note that DNS-over-TLS requires additional data to be |
| 261 |
send for setting up an encrypted connection, and thus results |
| 262 |
in a small DNS look-up time penalty.</para> |
| 263 |
|
| 264 |
<para>Note that in <literal>opportunistic</literal> mode the |
| 265 |
resolver is not capable of authenticating the server, so it is |
| 266 |
vulnerable to "man-in-the-middle" attacks.</para> |
| 267 |
|
| 268 |
<para>In addition to this global <varname>DNSOverTLS=</varname> setting |
| 269 |
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 270 |
also maintains per-link <varname>DNSOverTLS=</varname> settings. For system DNS servers (see above), only the global |
| 271 |
<varname>DNSOverTLS=</varname> setting is in effect. For per-link DNS servers the per-link setting is in effect, unless |
| 272 |
it is unset in which case the global setting is used instead.</para> |
| 273 |
|
| 274 |
<para>Defaults to <literal>&DEFAULT_DNS_OVER_TLS_MODE;</literal>.</para> |
| 275 |
|
| 276 |
<xi:include href="version-info.xml" xpointer="v239"/> |
| 277 |
</listitem> |
| 278 |
</varlistentry> |
| 279 |
|
| 280 |
<varlistentry> |
| 281 |
<term><varname>Cache=</varname></term> |
| 282 |
<listitem><para>Takes a boolean or <literal>no-negative</literal> as argument. If |
| 283 |
<literal>yes</literal> (the default), resolving a domain name which already got queried earlier will |
| 284 |
return the previous result as long as it is still valid, and thus does not result in a new network |
| 285 |
request. Be aware that turning off caching comes at a performance penalty, which is particularly high |
| 286 |
when DNSSEC is used. If <literal>no-negative</literal>, only positive answers are cached.</para> |
| 287 |
|
| 288 |
<para>Note that caching is turned off by default for host-local DNS servers. |
| 289 |
See <varname>CacheFromLocalhost=</varname> for details.</para> |
| 290 |
|
| 291 |
<xi:include href="version-info.xml" xpointer="v231"/></listitem> |
| 292 |
</varlistentry> |
| 293 |
|
| 294 |
<varlistentry> |
| 295 |
<term><varname>CacheFromLocalhost=</varname></term> |
| 296 |
<listitem><para>Takes a boolean as argument. If <literal>no</literal> (the default), and response cames from |
| 297 |
host-local IP address (such as 127.0.0.1 or ::1), the result would not be cached in order to avoid |
| 298 |
potential duplicate local caching.</para> |
| 299 |
|
| 300 |
<xi:include href="version-info.xml" xpointer="v248"/> |
| 301 |
</listitem> |
| 302 |
</varlistentry> |
| 303 |
|
| 304 |
<varlistentry> |
| 305 |
<term><varname>DNSCacheSize=</varname></term> |
| 306 |
<term><varname>MulticastDNSCacheSize=</varname></term> |
| 307 |
<term><varname>LLMNRCacheSize=</varname></term> |
| 308 |
<listitem><para>Takes a non-negative integer. Configures the maximum number of DNS resource record |
| 309 |
entries that may be stored in the per-scope cache for unicast DNS, Multicast DNS (mDNS), and |
| 310 |
Link-Local Multicast Name Resolution (LLMNR) respectively. Each defaults to 4096. The maximum |
| 311 |
allowed value is 16777216 (2^24). Setting any of these to 0 effectively disables caching for the |
| 312 |
respective protocol. These settings are only effective when <varname>Cache=</varname> is set to |
| 313 |
<literal>yes</literal> or <literal>no-negative</literal>. If <varname>Cache=no</varname>, caching |
| 314 |
is fully disabled regardless of these values.</para> |
| 315 |
|
| 316 |
<para>Note that Multicast DNS relies heavily on caching for request suppression and efficient |
| 317 |
operation. It is recommended to keep <varname>MulticastDNSCacheSize=</varname> at a reasonably high |
| 318 |
value even when reducing <varname>DNSCacheSize=</varname>.</para> |
| 319 |
|
| 320 |
<para>Note that <command>systemd-resolved</command> automatically flushes all caches on system |
| 321 |
memory pressure, thus in most cases manual cache size configuration should not be necessary.</para> |
| 322 |
|
| 323 |
<para>Note that caching is turned off by default for host-local DNS servers. |
| 324 |
See <varname>CacheFromLocalhost=</varname> for details.</para> |
| 325 |
|
| 326 |
<xi:include href="version-info.xml" xpointer="v261"/> |
| 327 |
</listitem> |
| 328 |
</varlistentry> |
| 329 |
|
| 330 |
<varlistentry> |
| 331 |
<term><varname>DNSStubListener=</varname></term> |
| 332 |
<listitem><para>Takes a boolean argument or one of <literal>udp</literal> and |
| 333 |
<literal>tcp</literal>. If <literal>udp</literal>, a DNS stub resolver will listen for UDP requests |
| 334 |
on addresses 127.0.0.53 and 127.0.0.54, port 53. If <literal>tcp</literal>, the stub will listen for |
| 335 |
TCP requests on the same addresses and port. If <literal>yes</literal> (the default), the stub listens |
| 336 |
for both UDP and TCP requests. If <literal>no</literal>, the stub listener is disabled.</para> |
| 337 |
|
| 338 |
<xi:include href="systemd-resolved.service.xml" xpointer="proxy-stub" /> |
| 339 |
|
| 340 |
<para>Note that the DNS stub listener is turned off implicitly when its listening address and port are already |
| 341 |
in use.</para> |
| 342 |
|
| 343 |
<xi:include href="version-info.xml" xpointer="v232"/></listitem> |
| 344 |
</varlistentry> |
| 345 |
|
| 346 |
<varlistentry> |
| 347 |
<term><varname>RefuseRecordTypes=</varname></term> |
| 348 |
<listitem><para>Takes a list of DNS record types separated by space. |
| 349 |
Specified record types in each query will be refused. This option can be specified multiple times. |
| 350 |
If an empty string is specified, then all previous assignments are cleared.</para> |
| 351 |
<para>Examples: |
| 352 |
<programlisting>RefuseRecordTypes=AAAA SRV TXT</programlisting> |
| 353 |
</para> |
| 354 |
|
| 355 |
<para>Note that to refuse AAAA record (unlike SRV, TXT, etc.) completely, please also disable IPv6 stack in kernel |
| 356 |
with "sysctl -w net.ipv6.conf.all.disable_ipv6=1".</para> |
| 357 |
|
| 358 |
<xi:include href="version-info.xml" xpointer="v258"/></listitem> |
| 359 |
</varlistentry> |
| 360 |
|
| 361 |
<varlistentry> |
| 362 |
<term><varname>DNSStubListenerExtra=</varname></term> |
| 363 |
<listitem><para>Takes an IPv4 or IPv6 address to listen on. The address may be optionally |
| 364 |
prefixed with a protocol name (<literal>udp</literal> or <literal>tcp</literal>) separated with |
| 365 |
<literal>:</literal>. If the protocol is not specified, the service will listen on both UDP and |
| 366 |
TCP. It may be also optionally suffixed by a numeric port number with separator |
| 367 |
<literal>:</literal>. When an IPv6 address is specified with a port number, then the address |
| 368 |
must be in the square brackets. If the port is not specified, then the service uses port 53. |
| 369 |
Note that this is independent of the primary DNS stub configured with |
| 370 |
<varname>DNSStubListener=</varname>, and only configures <emphasis>additional</emphasis> |
| 371 |
sockets to listen on. This option can be specified multiple times. If an empty string is |
| 372 |
assigned, then the all previous assignments are cleared. Defaults to unset.</para> |
| 373 |
|
| 374 |
<para>Examples: |
| 375 |
<programlisting>DNSStubListenerExtra=192.168.10.10 |
| 376 |
DNSStubListenerExtra=2001:db8:0:f102::10 |
| 377 |
DNSStubListenerExtra=192.168.10.11:9953 |
| 378 |
DNSStubListenerExtra=[2001:db8:0:f102::11]:9953 |
| 379 |
DNSStubListenerExtra=tcp:192.168.10.12 |
| 380 |
DNSStubListenerExtra=udp:2001:db8:0:f102::12 |
| 381 |
DNSStubListenerExtra=tcp:192.168.10.13:9953 |
| 382 |
DNSStubListenerExtra=udp:[2001:db8:0:f102::13]:9953</programlisting> |
| 383 |
</para> |
| 384 |
|
| 385 |
<xi:include href="version-info.xml" xpointer="v247"/></listitem> |
| 386 |
</varlistentry> |
| 387 |
|
| 388 |
<varlistentry> |
| 389 |
<term><varname>ReadEtcHosts=</varname></term> |
| 390 |
<listitem><para>Takes a boolean argument. If <literal>yes</literal> (the default), |
| 391 |
<command>systemd-resolved</command> will read <filename>/etc/hosts</filename>, and try to resolve |
| 392 |
hosts or addresses by using the entries in the file before sending query to DNS servers. |
| 393 |
</para> |
| 394 |
|
| 395 |
<xi:include href="version-info.xml" xpointer="v240"/></listitem> |
| 396 |
</varlistentry> |
| 397 |
|
| 398 |
<varlistentry> |
| 399 |
<term><varname>ReadStaticRecords=</varname></term> |
| 400 |
<listitem><para>Takes a boolean argument. If <literal>yes</literal> (the default), |
| 401 |
<command>systemd-resolved</command> will read |
| 402 |
<filename>/etc/systemd/resolve/static.d/*.rr</filename>, |
| 403 |
<filename>/run/systemd/resolve/static.d/*.rr</filename>, |
| 404 |
<filename>/usr/local/lib/systemd/resolve/static.d/*.rr</filename>, |
| 405 |
<filename>/usr/lib/systemd/resolve/static.d/*.rr</filename>, and try to resolve lookups by using the |
| 406 |
entries in these files before sending query to DNS servers. This functionality is very similar to the |
| 407 |
one controlled by <varname>ReadEtcHosts=</varname>, but allows more flexible control of DNS resource |
| 408 |
records fields beyond just A/AAAA/PTR. See |
| 409 |
<citerefentry><refentrytitle>systemd.rr</refentrytitle><manvolnum>5</manvolnum></citerefentry> for |
| 410 |
details.</para> |
| 411 |
|
| 412 |
<para>If both this option and <varname>ReadEtcHosts=</varname> are enabled then this mechanism takes |
| 413 |
precedence: any records discovered via static resource records will take precedence over records |
| 414 |
under the same name from <filename>/etc/hosts</filename>.</para> |
| 415 |
|
| 416 |
<xi:include href="version-info.xml" xpointer="v261"/></listitem> |
| 417 |
</varlistentry> |
| 418 |
|
| 419 |
<varlistentry> |
| 420 |
<term><varname>ResolveUnicastSingleLabel=</varname></term> |
| 421 |
<listitem><para>Takes a boolean argument. When false (the default), |
| 422 |
<command>systemd-resolved</command> will not resolve A and AAAA queries for single-label names over |
| 423 |
classic DNS. Note that such names may still be resolved if search domains are specified (see |
| 424 |
<varname>Domains=</varname> above), or using other mechanisms, in particular via LLMNR or from |
| 425 |
<filename>/etc/hosts</filename>. When true, queries for single-label names will be forwarded to |
| 426 |
global DNS servers even if no search domains are defined. |
| 427 |
</para> |
| 428 |
|
| 429 |
<para>This option is provided for compatibility with configurations where <emphasis>public DNS |
| 430 |
servers are not used</emphasis>. Forwarding single-label names to servers not under your control is |
| 431 |
not standard-conformant, see <ulink |
| 432 |
url="https://www.iab.org/documents/correspondence-reports-documents/2013-2/iab-statement-dotless-domains-considered-harmful/">IAB |
| 433 |
Statement</ulink>, and may create a privacy and security risk.</para> |
| 434 |
|
| 435 |
<xi:include href="version-info.xml" xpointer="v246"/></listitem> |
| 436 |
</varlistentry> |
| 437 |
<varlistentry> |
| 438 |
<term><varname>StaleRetentionSec=</varname><replaceable>SECONDS</replaceable></term> |
| 439 |
<listitem><para>Takes a duration value, which determines the length of time DNS resource records can |
| 440 |
be retained in the cache beyond their Time To Live (TTL). This allows these records to be returned as |
| 441 |
stale records. By default, this value is set to zero, meaning that DNS resource records are not |
| 442 |
stored in the cache after their TTL expires.</para> |
| 443 |
|
| 444 |
<para>This is useful when a DNS server failure occurs or becomes unreachable. In such cases, |
| 445 |
<citerefentry><refentrytitle>systemd-resolved</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 446 |
continues to use the stale records to answer DNS queries, particularly when no valid response can be |
| 447 |
obtained from the upstream DNS servers. However, this does not apply to NXDOMAIN responses, as those |
| 448 |
are still perfectly valid responses. This feature enhances resilience against DNS infrastructure |
| 449 |
failures and outages.</para> |
| 450 |
|
| 451 |
<para><command>systemd-resolved</command> always attempts to reach the upstream DNS servers first, |
| 452 |
before providing the client application with any stale data. If this feature is enabled, cache will |
| 453 |
not be flushed when changing servers.</para> |
| 454 |
|
| 455 |
<xi:include href="version-info.xml" xpointer="v254"/> |
| 456 |
</listitem> |
| 457 |
</varlistentry> |
| 458 |
</variablelist> |
| 459 |
</refsect1> |
| 460 |
|
| 461 |
<refsect1> |
| 462 |
<title>See Also</title> |
| 463 |
<para><simplelist type="inline"> |
| 464 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 465 |
<member><citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> |
| 466 |
<member><citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> |
| 467 |
<member><citerefentry><refentrytitle>dnssec-trust-anchors.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 468 |
<member><citerefentry><refentrytitle>systemd.rr</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 469 |
<member><citerefentry project='man-pages'><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 470 |
</simplelist></para> |
| 471 |
</refsect1> |
| 472 |
|
| 473 |
</refentry> |