Use systemd-resolved to Enable DNS over TLS Support
Last updated on 2021-10-19, Tue, 12:37 AM
Intention
Use DNS over TLS
to avoid potential censorship or poisoning.
Procedure
Let NetworkManager
use systemd-resolved
for name resolution.
And add such content:
Save and exit, then set up DoT
mode for systemd-resolved
.
Edit the responsible part like this:
I chose cloudflare
and dns.sb
here, and you can replace them with your own choice.
You can switch on DNSSEC
validation if the server supports that.
Additionally, you may need to change the DNS server in /etc/resolv.conf
.
Toggle Comment all other nameservers and type:
Save. Then set up write protect for it.
Then just enable systemd-resolved
and restart NetworkManager
.
Everything should work as expected now.
P. S.
The lookup latency may be significantly longer than expected.
Then I made a terrible typo.
D N A