Results 1 to 8 of 8

Thread: [SOLVED] forgets DNS upon reboot

  1. #1
    Join Date
    Jul 2007
    Beans
    267
    Distro
    Ubuntu 11.04 Natty Narwhal

    [SOLVED] forgets DNS upon reboot

    My problem is one that has been covered a number of times in these forums: I have a laptop with Ubuntu 8.04 and it forgets DNS servers upon each reboot.

    I've already tried the various tricks to fix this bug, such as (from the instructions on the opendns.org site) adding the line

    prepend domain-name-servers 208.67.222.222,208.67.220.220;

    to my /etc/dhcp3/dhclient.conf

    and I've even disabled the Network Manager applet from the list of programs to boot at startup, in a last ditch effort to fix this.

    I'm about to go crazy. Is there *anything* else that I can do to fix this? Does Debian have this problem, too, or is it just Ubuntu-specific?

    I've got a desktop with Ubuntu that does not have this problem at all. I've disabled the laptop's wireless, in case that was somehow the cause, but no luck.

  2. #2
    Join Date
    Jan 2007
    Location
    ~/PA/USA
    Beans
    1,980
    Distro
    Ubuntu

    Re: forgets DNS upon reboot

    Have you configured your "/etc/resolv.conf" file?

  3. #3
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: forgets DNS upon reboot

    try to disable Network Manager and add the DNS to the
    /etc/resolv.conf file

    Code:
    sudo echo "nameserver 208.67.222.222" | tee -a /etc/resolv.conf
    sudo echo "nameserver 208.67.220.220" | tee -a /etc/resolv.conf

  4. #4
    Join Date
    Jul 2007
    Beans
    267
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: forgets DNS upon reboot

    Quote Originally Posted by cdtech View Post
    Have you configured your "/etc/resolv.conf" file?
    Yes, it is currently as follows:

    # 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
    nameserver 208.67.222.222
    nameserver 208.67.220.220


    But when I reboot, it'll only have the first two # lines. As far as I understand, I've done everything right and it should work. The kicker is, it doesn't.

  5. #5
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: forgets DNS upon reboot

    network-manager overwrites the file.
    i've removed it:
    Code:
    sudo aptitude remove network-manager network-manager-gnome
    EDIT:
    make sure your network is configured in the /etc/network/interfaces file
    EDIT2:

    befor you remove the packages download them:
    Code:
    sudo aptitude download network-manager network-manager-gnome
    in order to be able to reinstall them without network connection.
    Last edited by sisco311; August 9th, 2008 at 08:56 PM.

  6. #6
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: forgets DNS upon reboot

    Just thought I'd mention this in case you haven't all ready tried it, but if you use Network Manager to set up your connection, have you added the OpenDNS servers under the "DNS" tab? Whenever I do that I have no problem with the changes sticking between boots.

  7. #7
    Join Date
    Jan 2007
    Location
    ~/PA/USA
    Beans
    1,980
    Distro
    Ubuntu

    Re: forgets DNS upon reboot

    I don't use NM, I've found it a bad choice on my setup. I use "wicd" to connect my wireless (much better choice).

    To use "wicd" just insert this line within your /etc/apt/sources.list:
    Code:
    deb http://apt.wicd.net hardy extras
    Do a "sudo apt-get update" then "sudo apt-get install wicd"

    Just in case you want to try it out.......

  8. #8
    Join Date
    Jul 2007
    Beans
    267
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: forgets DNS upon reboot

    I followed Sisco311's advice (and also installed wicd and will check that out) as well as created a /etc/dhclient-enter-hooks file with:

    make_resolv_conf() {
    echo "doing nothing to resolv.conf"
    }

    as its content. I'm not sure exactly which of these did the trick, but I just rebooted, and (for the first time in months!) my DNS settings have stuck. Thanks everybody!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •