0

I made these changes to resolv.conf today and when i restarted my laptop i cannot connect to the internet. It says server cant be found. These commands were given to me by unoDNS when trying to delete it from my system.

sudo mv /etc/resolv.conf /etc/resolv.conf.bak
echo "nameserver 8.8.8.8" | sudo tee  /etc/resolv.conf
echo "nameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf

Any suggestions as to what went wrong. I am using Ubuntu 14.04 LTS.

Xweque
  • 1,103
user266003
  • 1
  • 1
  • 1
  • You need to describe what steps you took exactly. Normally you set your DNS in Network manager, see http://askubuntu.com/questions/2321/what-is-the-proper-way-to-change-the-dns-ip – Panther May 08 '14 at 18:00
  • What precisely are the symptoms and problems you have when trying to get online? – 0xSheepdog May 08 '14 at 18:01
  • i cant remember the steps exactly but it involved resolv.conf and entering 8.8.8.8 into it, and then 8.8.4.4. when i restarted my router and laptop i cant access the internet. it says server cannot be reached – user266003 May 08 '14 at 18:04
  • 1
    What is the output of cat /etc/resolv.conf? – jobin May 08 '14 at 19:46
  • from the file `# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

    DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN` so why do you edit it? it is not the correct place

    – Rinzwind May 08 '14 at 19:53

2 Answers2

3

When you did sudo mv /etc/resolv.conf /etc/resolv.conf.bak you removed what was probably the symbolic link to the dynamically generated file /run/resolvconf/resolv.conf.

To restore the symbolic link do the following

sudo dpkg-reconfigure resolvconf

and then reboot.

jdthood
  • 12,467
3

Your system use resolvconf and the file resolv.conf is generated dynamically. To properly update the nameserver you can put the dns parameters in:

/etc/network/interfaces

auto eth0
iface eth0 inet static
 address 1.1.1.1
 netmask 255.255.255.0
 gateway 1.1.1.2
 dns-names 8.8.8.8

or Menu > Settings > Network > Wired > Edit > IPv4 > DNS > Server: 8.8.8.8 and then reboot.