Fedora and fallback DNS servers
Systemd-resolved continues the systemd tradition of replacing venerable, low-level system components. It brings a number of new features, including a D-Bus interface that provides more information than the traditional gethostbyname() family (which is still supported, of course), DNS-over-TLS, LLMNR support, split-DNS support, local caching, and more. It is not exactly new; Ubuntu switched over in the 16.10 release. Fedora thus may not have lived up to its "first" objective with regard to systemd-resolved, but it did eventually make the switch.
It is probably fair to say that most Fedora users never noticed that things had changed. Toward the end of 2020, though, Zbigniew Jędrzejewski-Szmek made a change that drew some new attention toward systemd-resolved: he disabled the use of fallback DNS servers. The fallback mechanism is intended to ensure that a system has a working domain-name resolver, even if it is misconfigured or the configured servers do not work properly. As a last resort, systemd-resolved will use the public servers run by Google and Cloudflare for lookup operations. On Fedora 33 systems, though, that fallback has been disabled as of the systemd-246.7-2 update, released at the end of 2020.
Toward the end of February, Tadej Janež went
to the fedora-devel mailing list to argue that this change should be
reverted, saying: "On F33, this actually breaks a working vanilla
cloud instance by removing the fallback DNS server list in a systemd
upgrade, effectively leaving the system with no DNS servers
configured
". As one might expect, this was not the desired state of
affairs. This post generated some discussion about the change, but
it may not lead to an update to Fedora's policy.
One might wonder why a seemingly useful feature like automatic fallback was disabled. The reasoning, as described by Jędrzejewski-Szmek in this changelog, has to do with privacy and compliance with the European GDPR directive:
Janež suggested that the situation could be improved in either of a couple
of ways. Rather than disabling the fallback servers everywhere, Fedora
could leave them enabled for cloud images, where, it seems, broken DNS
configurations are more likely to happen and there tends not to be an
individual user to identify in any case. Or Fedora could pick a
"reputable DNS resolver
" that is known to respect privacy and
use it to re-enable the fallback for everybody. Jędrzejewski-Szmek
replied
that the first option might be possible, but rejected the second, saying
that finding a provider that is acceptable worldwide would be a challenge
at best.
Beyond privacy concerns, there was another reason cited in the discussion for the removal of the DNS fallbacks: they can hide problems in DNS configurations. Without the fallbacks, a broken configuration is nearly guaranteed to come to the user's attention (though said user may be remarkably unappreciative) and will, presumably, be fixed. With the fallbacks, instead, everything appears to work and the user may never know that there is a problem. So the configuration will not be fixed, leading to a worse situation overall.
Lennart Poettering, though, described this
view as "bogus and very user unfriendly
". It is better, he
said, to complain loudly and fall back to a working setup than to leave the
system without domain-name service entirely. A lot of users do not know
how to fix DNS themselves, and they won't even be able to ask for help on
the net if DNS is not working for them.
Poettering also raised another issue: the privacy argument does not always make sense because using the public DNS servers may well be the more privacy-respecting option anyway:
The change by Jędrzejewski-Szmek acknowledged this point as well, and noted
the additional point that ISP-provided DNS servers may not have the user's
best interest in mind either. He still concluded that they were the better
option because "they are more obvious to users and fit better in the
regulatory framework
". In any case, nobody is proposing using
Google or Cloudflare servers in preference to those provided by the local
network.
What will happen with Fedora's configuration is far from clear at this
point. There seems to be some real resistance to enabling the fallback
servers, even though the actual privacy and legal risk would appear to be
small. Most Fedora users will probably never notice, but a subset may have
to learn the details of using the resolvectl
command to create a
working DNS configuration by hand. Once again, they may be limited in
their appreciation of this state of affairs.
