1

I want to change that address to a more private and secure DNS server. I added it just to connect to the internet and be able to install my updates, now since it's a read-only file I can't directly change it using the vim editor. What are my options? To add the DNS address I executed:

echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null

The process can be found in the post here as well: apt-get update fails to fetch files, “Temporary failure resolving …” error

  • My bad, I'm new to Ubuntu. Guess wasn't smart enough to think of that ;) – softwareexchange May 16 at 19:08
  • You started using Ubuntu so must be a smart guy :) do not worry keep experimenting and asking questions, that is what Tesla and Darwin did. – Marc May 17 at 5:04
2

You need to be admin to change the file. Use:

sudo vim /etc/resolvconf/resolv.conf.d/base

ps there are better ways to add a DNS number.

You can do that on the standard Ubuntu desktop. Click on the network icon. If wire connection its called Wired connection. Click wired settings. Now click on the little settings icon Right next to the on/off button of the connection. You see the DNS settings there. Go to the IPv4 TAB and there is a blank line called DNS. Fill in the new DNS and press the Apply button.

Now turn of the connection and turn it on again with the big red on/off button.

Voila the DNS is added as can be seen in the connection settings where the new ip is added to the list of DNS addresses.

If you only want to use your own DNS and not the ones you received from your ISP set the on/off button next to the DNS setting in the IPv4 TAB to off. Press Apply, turn the connection off and on again and voila only your dns is used.

  • 1
    I believe I have administrator privileges. I'm more concerned with security reasons, that's why I need to use a private DNS server. Please do elaborate on the better method. – softwareexchange May 16 at 19:05
  • As u used sudo to implement the change you will need sudo to get it out too. – Marc May 16 at 19:08
  • what do you mean by getting it out? – softwareexchange May 16 at 19:09
  • do you mean exiting the editor? – softwareexchange May 16 at 19:11
  • 1
    No i mean that you need to use sudo (admin rights) to access the file. As admin the file was edited and you need to edit it again as admin. – Marc May 16 at 19:17

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.