0

Is there a way to set the used DNS in elementaryOS Loki in a graphical manner?

The following is the only working way that I have found to change the DNS when using DNSCrypt...

  1. Editing /etc/resolv.conf which is a symlink for /run/resolvconf/resolv.conf and adding to it:

nameserver 127.0.0.1

One can use Scratch for editing the file, but I wondered if there was a way to change the used DNS in GUI software like in the Network Settings of the system.

0

You can edit a network connection in Network Settings, then you are able to add additional DNS servers which will work alongside the automatic ones from DHCP (which are generally provided by networking hardware / ISP), or else you can specify to use only the DNS servers you want by selecting Manual or Automatic DHCP (Addresses Only)

This is in the IPv4 and IPv6 tabs of the settings.

Editing /etc/resolv.conf manually doesn't persist, it will be automatically overwritten (which is normal as different connections require different DNS like office intranet etc.), so I'd move away from that approach if possible.

Hope this helps.

  • Hi. It did help a little bit. Thanks! Though a few more steps had to be taken for the written directions to work. I solved it by disabling dnsmasq in /etc/NetworkManager/NetworkManager.conf as described in the answer here: askubuntu.com/questions/627899/…. And then following your directions. For some reason I still don't understand, when dnsmasq is enabled, it didn't work for me. Thanks again. – user5950 Dec 19 '17 at 1:20
0

Step 1: (Follow only for loopback DNS addresses)

Disable dnsmasq in /etc/NetworkManager/NetworkManager.conf by comenting the line that contains dns=dnsmasq with a hash symbol (#). Like this:

#dns=dnsmasq

Step 2:

  • Open the Network Settings and in the connection of interest, select Settings...

  • Navigate to the IPv4 Settings tab and there, select the option Automatic (DHCP) addresses only from the Method field.

  • Then, on the DNS servers field, write the address of the DNS to use. In this case 127.0.0.1.
  • Hit Save.

Network Settings

Step 3:

Restart the network manager service with the following command

sudo service network-manager restart

Notes: If you use remote DNS server addresses, like 8.8.8.8, you don't need to disable dnsmasq. You can skip to Step 2. Step 1 is only for when using loopback addresses, like with DNSCrypt.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.