Fedora35/Gnome; where best to define DNS nameserver

Hi,
I recently started with a fresh installation of Fedora35/Gnome. While implementing I needed to adjust the DNS nameservers, but I am not aware of the best file to update. I started with /etc/resolv.conf and /run/systemd/resolve/stub-resolv.conf, but after having rebooted my modifications have been lost. Later I detected Changes/systemd-resolved - Fedora Project Wiki with hints regarding systemd-resolved. I updated /etc/systemd/resolved.conf , but updates there are ignored.
So where best to define DNS nameservers in my environment?

Thank you in advance.

1 Like

I set DNS servers for each connection individually. The downside of this approach is that I need to reconnect or restart NetworkManager for changes to take effect.

Look into it we have already solves this dns issue how to what are options and so.

Possibly I was not clear enough. I am not looking for a new DNS client. I am asking where best to define DNS nameservers in a Fedora35/Gnome installation:

  • /etc/resolv.conf and/or
  • /run/systemd/resolve/stub-resolv.conf and/or
  • /etc/systemd/resolved.conf
  • or somewhere else?

Thank you.

1 Like

Use this for using a dns over tls
And for normal dns use

Use anything you like

For resolved.conf try unhash that you want to use and make dns over tls no to yes and save that you need sudo permission for doing this and save that file and reboot
For /etc/resolv.conf it is also same as that easy.

I think this is the config file for systemd-resolved, as per: