Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: DNS Settings Deleted Every Time I Reboot

  1. #1
    Join Date
    Jan 2006
    Location
    Orlando, FL
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Exclamation DNS Settings Deleted Every Time I Reboot

    So I did a fresh install of 11.10 Ubuntu today and I made sure I configured /etc/resolv.conf so that my DNS information is correct. My system is running a static I.P. address as shown below:

    Code:
    cmennens@tuna:~$ cat /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet static
    	address 10.1.10.204
    	netmask 255.255.255.0
    	network 10.1.10.0
    	broadcast 10.1.10.255
    	gateway 10.1.10.1
    	# dns-* options are implemented by the resolvconf package, if installed
    	dns-search database.org
    Now also I configured my /etc/resolv.conf:

    Code:
    cmennens@tuna:~$ cat /etc/resolv.conf
    # Generated by NetworkManager
    search database.org
    nameserver 10.1.1.6
    nameserver 10.1.1.7
    Now everytime I reboot my machine, the info from /etc/resolv.conf is removed / deleted and I can't get to the Internet. When I manually enter my DNS server info back into resolv.conf, my Internet works again fine. This is extremely frustrating...please help me!
    "It said install Windows 98 or better so I installed Linux..."

  2. #2
    Join Date
    Jul 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: DNS Settings Deleted Every Time I Reboot

    Quote Originally Posted by CarlosinFL View Post
    So I did a fresh install of 11.10 Ubuntu today and I made sure I configured /etc/resolv.conf so that my DNS information is correct. My system is running a static I.P. address as shown below:

    Code:
    cmennens@tuna:~$ cat /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet static
    	address 10.1.10.204
    	netmask 255.255.255.0
    	network 10.1.10.0
    	broadcast 10.1.10.255
    	gateway 10.1.10.1
    	# dns-* options are implemented by the resolvconf package, if installed
    	dns-search database.org
    Now also I configured my /etc/resolv.conf:

    Code:
    cmennens@tuna:~$ cat /etc/resolv.conf
    # Generated by NetworkManager
    search database.org
    nameserver 10.1.1.6
    nameserver 10.1.1.7
    Now everytime I reboot my machine, the info from /etc/resolv.conf is removed / deleted and I can't get to the Internet. When I manually enter my DNS server info back into resolv.conf, my Internet works again fine. This is extremely frustrating...please help me!
    What does the /etc/resolv.conf file look like after you boot up -- BEFORE you re-configure it to work?
    Last edited by redmk2; October 18th, 2011 at 08:50 PM.

  3. #3
    Join Date
    Oct 2009
    Beans
    Hidden!

    Re: DNS Settings Deleted Every Time I Reboot

    I'm in the same boat with precisely the same problem. Apparently, Ubuntu now configures a certain NetworkManager application to ignore whatever network configuration you might have been naive enough to supply. It seems GUI-or-nothing to configure one's networking - unless you want to risk Ubuntu stomping all over your existing configuration. This is a real pisser!

    I tried editing /etc/dhcp/dhclient.conf to activate the line
    prepend domain-name-servers <dns-server-ip-addr-1> <addr-2>

    sudo service network-manager restart
    just empties out the /etc/resolv.conf again.

    Somebody didn't get the memo about manual system configuration,
    via direct file edits, trumping any GUI-facing tools (like Network-Manager). Network-manager SUCKS!

    I suspect apt-get remove --purge network-manager is the cure - but that might mess with assumptions made elsewhere in Ubuntu ... if Ubuntu is going to a GUI-only kind of distro. Good grief!

  4. #4
    Join Date
    Jul 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: DNS Settings Deleted Every Time I Reboot

    Quote Originally Posted by shulegaa View Post
    I'm in the same boat with precisely the same problem. Apparently, Ubuntu now configures a certain NetworkManager application to ignore whatever network configuration you might have been naive enough to supply. It seems GUI-or-nothing to configure one's networking - unless you want to risk Ubuntu stomping all over your existing configuration. This is a real pisser!

    I tried editing /etc/dhcp/dhclient.conf to activate the line
    prepend domain-name-servers <dns-server-ip-addr-1> <addr-2>

    sudo service network-manager restart
    just empties out the /etc/resolv.conf again.

    Somebody didn't get the memo about manual system configuration,
    via direct file edits, trumping any GUI-facing tools (like Network-Manager). Network-manager SUCKS!

    I suspect apt-get remove --purge network-manager is the cure - but that might mess with assumptions made elsewhere in Ubuntu ... if Ubuntu is going to a GUI-only kind of distro. Good grief!
    I believe that you can configure NM to ignore manually configured interfaces. But if you only have 1 wired interface, I would just remove NM asyou said. Why fight what works for The majority; those that need the hand holding?

  5. #5
    Join Date
    Jan 2006
    Location
    Orlando, FL
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: DNS Settings Deleted Every Time I Reboot

    When it it reboots, it looks like :

    Code:
    # Generated by NetworkManager
    It just has one commented out line. I don't understand what the point of this is or why in the world Debian/Ubuntu developers would not fix something like this. If I statically implement an I.P. and DNS configuration into my network profile under any O.S. (Even Microsoft), it retains it logically. What am I missing here?
    "It said install Windows 98 or better so I installed Linux..."

  6. #6
    Join Date
    Oct 2011
    Beans
    18

    Re: DNS Settings Deleted Every Time I Reboot

    Had similar issue, but am using DHCP.
    There are two options for DHCP
    - DHCP Only
    - DHCP addresses only.

    Seems after update last week my settings were reverted to DHCP Addresses only.

    Result resolv.conf same as your file : only the header.
    Switched back to DHCP only option and back to normal again.

    Can you check if there might have been an sequence change in NM and although you think you have set static it is using something else.

    There are also 2 check boxes in the menu. Maybe you disabled one of them?

  7. #7
    Join Date
    Jan 2006
    Location
    Orlando, FL
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: DNS Settings Deleted Every Time I Reboot

    I don't use DHCP nor do we have a DHCP server on site here. I would have omitted the DHCP service daemon from the install if Ubuntu allowed me to customize my install...
    "It said install Windows 98 or better so I installed Linux..."

  8. #8
    Join Date
    Jul 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: DNS Settings Deleted Every Time I Reboot

    Quote Originally Posted by CarlosinFL View Post
    When it it reboots, it looks like :

    Code:
    # Generated by NetworkManager
    It just has one commented out line. I don't understand what the point of this is or why in the world Debian/Ubuntu developers would not fix something like this.
    Why fix what is working fine. What this means is that Network Manager (NM) is doing its job (e.g managing the interface).

    If I statically implement an I.P. and DNS configuration into my network profile under any O.S. (Even Microsoft), it retains it logically. What am I missing here?
    Configuring the file is only part of the deal here. If you don't want NM to manage that interface, you need to configure NM to ignore the interface or remove NM altogether.

    As far as NM is concerned you have left it in charge. Most Linux OS's use NM or some equivalent. It is a Gnome tool. Remember Ubuntu is not Windows.

    An example of NM configuration can be found here. Although this is a KDE example is is using NM and the config is the same.

  9. #9
    Join Date
    Jan 2006
    Location
    Orlando, FL
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: DNS Settings Deleted Every Time I Reboot

    Quote Originally Posted by redmk2 View Post
    Why fix what is working fine. What this means is that Network Manager (NM) is doing its job (e.g managing the interface).
    Configuring the file is only part of the deal here. If you don't want NM to manage that interface, you need to configure NM to ignore the interface or remove NM altogether.

    As far as NM is concerned you have left it in charge. Most Linux OS's use NM or some equivalent. It is a Gnome tool. Remember Ubuntu is not Windows.
    How is it working fine? I reboot my PC and I have no Internet because NM is wiping my resolv.conf. If I statically enter an IP address, I expect Linux to store and retain this info every time. Just like my host name and other network variables.

    I never made the relation between Ubuntu and Windows. I'm a pure Linux user and I've never had any distribution of Linux wipe any configuration file as I reboot.
    "It said install Windows 98 or better so I installed Linux..."

  10. #10
    Join Date
    Jul 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: DNS Settings Deleted Every Time I Reboot

    Quote Originally Posted by CarlosinFL View Post
    How is it working fine? I reboot my PC and I have no Internet because NM is wiping my resolv.conf. If I statically enter an IP address, I expect Linux to store and retain this info every time. Just like my host name and other network variables.
    Then you need to tell NM to ignore that interface. You are in control, but you need to set the configuration.

    I never made the relation between Ubuntu and Windows. I'm a pure Linux user and I've never had any distribution of Linux wipe any configuration file as I reboot.
    I guess this is not you speaking then?
    If I statically implement an I.P. and DNS configuration into my network profile under any O.S. (Even Microsoft), it retains it logically.
    NM has been a part of Gnome and KDE Desktops for some time now. Rather than complaining about how it shouldn't be that way, I suggest learning how it really works. Or, if you want to, remove NM completely.
    Last edited by redmk2; October 20th, 2011 at 06:12 PM.

Page 1 of 2 12 LastLast

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
  •