Écrit le 2023-10-15
First time I have to deal with an OS that don't let you setup your public DNS (aka non-liar DNS) in the traditional way, so I write this reminder.
It is a symlink. If you don't want troubles, don't touch it ;)
$ ls -la /etc/resolv.conf
lrwxrwxrwx 1 root root 37 14 oct. 10:17 /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf
Playing with NetworkManager settings just drives me crazy because it lets you do it, but nothing will change...
So in the end, it is just as simple as creating a new file: /etc/systemd/resolved.conf.d/dns~servers~.conf
Here is an example with FDN open DNS resolvers:
[Resolve]
DNS=80.67.169.12 2001:910:800::12
Domains=~.