I recently tried to enable system-wide DNS over https on Fedora. To do so I had to to some research and found out how comfusing it is for the average user (and even experienced users) to change the settings. In fact there are multiple backends messing with system DNS at the same time.

Most major Linux distributions use systemd-resolved for DNS but there is no utility for changing its configuration.

The average user would still try to change DNS settings by editing /etc/relov.conf (which is overwritten and will not survive reboots) or changing settings in Network Manager.

Based on documentation of systemd-resolved, the standard way of adding custom DNS servers is putting so-called ‘drop-in’ files in /etc/systemd/resolved.conf.d directory, especially when you want to use DNS-over-TLS or DNS-over-https.

Modern browsers use their buit-in DNS settings which adds to the confusion.

I think this is one area that Linux needs more work and more standardization.

How do you think it should be fixed?

  •  Joker   ( @Joker@beehaw.org ) 
    link
    fedilink
    English
    38 months ago

    I wouldn’t call it a mess. There’s a reason it’s not standard. It’s because Linux is about having choices. Linux users have such a variety of use cases and there are a zillion different kinds of hardware it runs on. There’s no one thing that works for everyone.

    I think this flexibility is a big part of what makes Linux special but also what makes it difficult for newcomers. The documentation on all the various software is typically very good to excellent. The harder part is figuring out which choice to make in the first place.

    I don’t really have any answers except to take it all in and be more willing to do some research than some other platforms may require.

    System-wide DoH is sort of a power user thing to begin with so other platforms will likely be similar. I think you would probably be using some kind of app to do it on Windows or Mac.

    By the way, you might want to take a look at stubby for your situation. I did something similar a few weeks back and that’s what I used. It’s runs a little local DNS proxy that forwards requests to your upstream servers. Then you would set your DNS server to 127.0.0.1 in NetworkManager or whatever you’re using. You have to change like 3 lines in the default stubby config a typical distro may provide to make it work.