# This file is part of systemd.
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the resolved.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
# See resolved.conf(5) for details.
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
# Cloudflare: 18.104.22.168#cloudflare-dns.com 22.214.171.124#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
# Google: 126.96.36.199#dns.google 188.8.131.52#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
# Quad9: 184.108.40.206#dns.quad9.net 220.127.116.11#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
#FallbackDNS=18.104.22.168#cloudflare-dns.com 22.214.171.124#dns.quad9.net 126.96.36.199#dns.google 2606:4700:4700::1111#cloudflare-dns.com 2620:fe::9#dns.quad9.net 2001:4860:4860::8888#dns.google
If I edit only this file, nothing happen, the network manager clearly follow what is written is /etc/resorv.conf. What did I miss ?
What can I say ? I tried to put the DNS I want to use and nothing happened. When I use the same DNS in /etc/resolv.conf it work fine (until the next update). So, I deduce the system clearly use the /etc/resolv.conf address and not the one set in the parameter menu. Do you have another explanation ?
I don’t want to use the dns of my internet provider.
How can I configure my dns properly, without having to do it again at each
update or each time I use a new network ? Ideally using DOH or DOT.
You need something local on the laptop like dnscrypt-proxy…
Not sure what option you did select when you disabled the “automatic” mode.
It certainly does work - when you select:
automatic (DHCP), addresses only
Then, the IP of the DNS server(s) you put in the box below will be the one that is used
instead of the one provided by your router
(which is the one your ISP gives you).
It is a comma separated list, as the tool tip tells which will appear when you hover the cursor over that input box.
No other changes needed - not to /etc/resolv.conf, no need to switch to systemd-resolved …
It is a per connection setting when you use the NetworkManager GUI
(you only do it once for each wlan network you connect to)
You could configure your router to use a custom DNS server instead - how that is done is specific to the router but is usually an option in the routers setup menu.
Then, all the devices that connect through that router will use the custom DNS.