Resolvconf Problem - cannot set nameservers

Discussion in 'Installation/Configuration' started by sheshes, Mar 28, 2013.

  1. sheshes

    sheshes Member

    I am running Ubuntu 12.10 with ISPConfig

    I am trying to setup my ISPs nameservers but resolv.conf is never changing. It's stuck on nameserver

    I tried editing /etc/network/interfaces and inserted dns-nameservers then resolvconf -u and then ifdown eth0 && ifup eth0. No result

    I tried editing /etc/resolvconf/resolvconf.d/base with same parameters, again no result.

    I tried disabling resolvconf updates as well as edit the dhcpclient.conf in both /etc/dhcp and /etc/dhcp3 with the prepent-domain again no result.

    I'm already frustrated enough and cannot think of anything else to try. I tried google but all the solutions proposed are mentioned above and don't work.

    Any help is appreciated
  2. DKLeader

    DKLeader Member

    Do you have a resolv.conf in /etc/?
    I am using Debian Squeeze and had to manually add them.
  3. sheshes

    sheshes Member

    yes I do, since ubuntu 12.04 onwards resolv.conf cannot be updated manually!
  4. sheshes

    sheshes Member

    Update: I have removed /etc/resolv.conf and run dpkg-reconfigure resolvconf and answered yes to all of the options. The result was that now /etc/resolv.conf is correctly created as a symlink, but still not able to update it as I want to
  5. arisystems

    arisystems New Member HowtoForge Supporter

    Does the NIC have the public IP4 address. I never used Comcast name server IPs when the NIC is the public facing IP. Post the interfaces file... another set of eyes...
  6. TiTex

    TiTex Member

    could it be because you have you NIC configured to get IP from DHCP server ?
    if so ... dhclient will automaticly update resolv.conf no matter what you've set manually.

    by the way /etc/resolv.conf is a symlink for /etc/resolvconf/run/resolv.conf if i'm not mistaken

    so i guess you can solve your problem by removing the symlink and create a normal conf file or add a write protect bit to resolv.conf after you've modified it
    chattr +i /etc/resolv.conf
  7. pititis

    pititis Member

    To add this nameserver:
    To delete this nameserver:
    eth0 = interface

    Try it.
  8. sheshes

    sheshes Member

    TiTex & Pititis thanks for your answers.

    TiTex my interface is set to static with an added dns-nameservers line as man resolvconf states. dhcp is not enabled. I want to make this work the proper way as I do a lot of update && distro upgrades and it keeps breaking up if everything is not done properly.

    Pititis I tried what you suggested. Unfortunately nothing is added in /etc/resolv.conf. It's stuck at nameservers

    any other suggestions?
  9. arisystems

    arisystems New Member HowtoForge Supporter

    One more time...

    Post the interfaces file. Odds are there is a simple error in it. If nothing else I will cut-n-paste it and try it in a server running here.
  10. sheshes

    sheshes Member

    # 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
  11. arisystems

    arisystems New Member HowtoForge Supporter

    Try this

    The file looks correct assuming the IPs are right. I always add a comma between the IPs after dns-nameservers. You could try the Google nameservers of,

    You can try this:

    ... and on some Zoneminder installs when moving the hard drive to a new physical CPU I have had problems get the "new" network cards to work properly and find that if I delete the /etc/udev/rules.d/70-persistent-net.rules and then power down (not restart) the system the two cars are then detected as eth0 and eth1. I know that this is not the specific thing you face but that file seems to have some hold-over on the interfaces configutation.

    Please repost what you find.
  12. sheshes

    sheshes Member

    Thanks for your suggestion. Unfortunately neither the comma between IPs in /etc/network/interfaces work neither the post with the modification of NetworkManager.
    as I am running the server edition of Ubuntu and not LTS so network manager is not installed
  13. bgardner

    bgardner New Member

    local nameserver

    I think this is caused by the way resolvconf treats local nameservers. Checking the man page, I noticed this:


    If set to "yes" then the libc script will include no more nameserver addresses after the first nameserver address that is a loopback address. (In IPv4 a loopback address is any one that starts with "127.". In IPv6 the loopback address is "::1".)

    The advantage of truncating the nameserver list after a loopback address is that doing so inhibits unnecessary changes to resolv.conf and thus reduces the number of instances in which the update-libc.d/ scripts have to be run. When an interface is brought up or down the local caching nameserver that listens on the loopback address is still informed of the change and adapts accordingly; the clients of the resolver which use the local caching nameserver do not need to be notified of the change. A disadvantage of this mode of operation is that applications have no secondary or tertiary nameserver address to fall back on should the local caching nameserver crash. Insofar as a local nameserver crash can be regarded as an unlikely event, this is a relatively minor disadvantage. Set to "no" to disable truncation. The default is "yes".

    A deprecated synonym for this variable is TRUNCATE_NAMESERVER_LIST_AFTER_127."

Share This Page