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

Thread: How do I add new nameservers in 12.04?

  1. #1
    Join Date
    May 2007
    Beans
    40

    How do I add new nameservers in 12.04?

    for our servers we use 3 nameservers, 1 gets added when the server is built and we put the other 2 into /etc/resolv.conf

    I've just built a 12.04 server and when I open resolv.conf, it tells me

    # 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

    Hmmmmm

    So I added the new ones into /etc/network/interfaces but I can't get them into resolv.conf.

    If I run resolvconf -u, I get this error

    resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing anything.


    I've tried a few other things but nothing that's even produced an error. any suggestions?

  2. #2
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How do I add new nameservers in 12.04?

    I haven't had anything overwrite the resolv.conf on Ubuntu server 12.04. Desktop, yes, but not server.

    Just add them to /etc/resolv.conf and go from there.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #3
    Join Date
    Jul 2011
    Beans
    126
    Distro
    Ubuntu Development Release

    Re: How do I add new nameservers in 12.04?

    You can just add them to resolv.conf but i believe it resets on reboot.

  4. #4
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How do I add new nameservers in 12.04?

    Quote Originally Posted by bubylou View Post
    You can just add them to resolv.conf but i believe it resets on reboot.
    You would be right.

    You can uninstall resolvconf and reboot then edit your name servers, or you can just use resolvconf to add them:
    http://wiki.debian.org/NetworkConfig...lvconf_program
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  5. #5
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,608
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: How do I add new nameservers in 12.04?

    Please refer to the Ubuntu server guide: https://help.ubuntu.com/12.04/server...ame-resolution

    It should work adding the information to your interfaces file, but you would need to re-start the interface or re-boot he computer to have it take effect (I think).

  6. #6
    Join Date
    Oct 2010
    Beans
    3

    Re: How do I add new nameservers in 12.04?

    Resolvconf is actually set through /etc/network/interfaces. You set up your interface then specify your dns-nameservers, dns-search and a domain if you like. On reboot, resolvconf will pick up these details and populate /etc/resolv.conf


    You can force the reset by restarting your network.

  7. #7
    Join Date
    Dec 2010
    Beans
    35

    Re: How do I add new nameservers in 12.04?

    Found this, which resolved most of the issues i was having

    http://hardc0l2e.wordpress.com/2012/...-with-dnsmasq/

  8. #8
    Join Date
    Dec 2010
    Beans
    573
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How do I add new nameservers in 12.04?

    In my case the service resolvconf was installed with 12.04 and I ended up having to add the lines to the file /etc/resolvconf/resolv.conf.d/base for them to stay.

  9. #9
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    13,663
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: How do I add new nameservers in 12.04?

    Quote Originally Posted by VMOS View Post
    I've just built a 12.04 server and when I open resolv.conf, it tells me
    Did you install the server version of 12.04 or one of the desktop versions? As Charles says, I'm pretty sure the server version doesn't use the resolvconf/dnsmasq setup found on the desktop versions.

    However the "official" method to add nameserver entries if your machine is using the resolvconf method is to add them into /etc/network/interfaces like this:

    Code:
    auto eth0 
    iface eth0 inet static  
    address 192.168.1.2  
    gateway 192.168.1.1
    network 192.168.1.0  
    broadcast 192.168.1.255
    dns-nameservers 8.8.8.8 8.8.4.4
    Note the "s" at the end of "nameservers". You need to use "nameservers" even if you have only one.

  10. #10

    Re: How do I add new nameservers in 12.04?

    Thanks for this information! I am running ubuntu 12.10 behind a old zonet router. I could ping IP but not domain names. This did the trick.

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •