How do I set a custom DNS server?

Custom DNS Settings

Hello, is there a way to set a custom dns?
What I have tried so far:

  • Garuda Assistant: you can only choose between a list of pre-set DNS providers.
  • Editing /etc/resolv.conf doesn't work, as it gets reset upon restart.
  • Changing settings through System Settings -> Network Manager doesn't affect /etc/resolv.conf (I think the settings on Garuda Assistant have priority over it).

What DE do you use (seems you never posted an inxi -Faz yet)? I know in KDE under System Settings -> Connections, you can pick what connection you want to modify the DNS for, then enter the DNS you want to use in IPv4 / IPv6 tabs.

You are right, on KDE, changing the DNS settings through the Connection tabs works, but only after a reboot. However I am wondering if there is a way to set a DNS for the network adapter (or even global - to be used by any network adapter) and not for the single network.

You can make it write protected by setting the immutable file attribute:

# chattr +i /etc/resolv.conf

More options here: Domain name resolution - ArchWiki


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.