Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: dhclient dns info from ISP not reaching resolvconf

  1. #11
    Join Date
    Apr 2006
    Beans
    417

    DNSmasq is a DNS server

    DNSmasq is a DNS and DHCP server. It's a pretty easy to setup DNS Caching server. Compared to BIND which has a pretty hard learning curve. I would recommend using just DHCP server if you just want DHCP. It isn't much harder to setup. I see that you removed network manager, so you will need to use the Ubuntu server's method for network settings. Which is in /etc/network/interfaces. Example:
    #/etc/network/interfaces
    # The loopback network interface
    auto lo
    iface lo inet loopback

    # Internet facing interface
    auto eth0
    iface eth0 inet dhcp

    auto eth1
    iface eth1 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    network 192.168.1.0
    Reboot to update resolv.conf or do it manually
    Code:
    apt-get install isc-dhcp-server
    cd /etc/dhcp/
    mv dhcpd.conf dhcpd.backup
    edit /etc/dhcp/dhcpd.conf
    # /etc/dhcp/dhcpd.conf
    ddns-update-style none;
    default-lease-time 3600;
    max-lease-time 7200;
    authoritative;
    log-facility local7;

    subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.11 192.168.1.100;
    option routers 192.168.1.1;
    option domain-name-servers 8.8.8.8;
    }
    So resolv.conf is only used for the server's DNS address, the clients DNS is given by the DHCP server set by dhcpd.conf under
    option domain-name-servers
    Last edited by bakegoodz; August 12th, 2012 at 11:40 PM.

  2. #12
    Join Date
    Apr 2007
    Beans
    26

    Re: dhclient dns info from ISP not reaching resolvconf

    Quote Originally Posted by papibe View Post
    Hi ahardy66.

    My first guess is that you are using the Desktop Edition.

    12.04 introduced a dnsmasq plugin for Network-Manager. It works great for is intended to do, but it is incompatible with other DNS packages like dnsmasq and bind (read here).

    If you are committed to use the Desktop Edition, you would need to unisntall Network-Manager and manage the network using config files.

    On the other hand, the server edition does not have this problem.

    Let us know how it goes.
    Regards.
    Hi Papibe - when I downloaded ubuntu I had 2 choices IIRC, one was 'alternate CD' and I figured that wasn't what I wanted. Looking at the download page now it seems obvious now but this is my first ubuntu installation.

    I also read in various places that installing and de-installing the stuff I wanted and didn't want should be painless, and I guess up until now, it was.

    I also had the 'dnsmasq' package installed - I didn't read that it was just a plug-in for network-manager.

    Will it be worth scrapping my installation and going with the server edition? Is the package selection any more different on the basic networking front?

    I do actually use the GUI window manager quite a bit - xfce actually - since it's not just a gateway box, it's also my home media center.

  3. #13
    Join Date
    Apr 2007
    Beans
    26

    Re: DNSmasq is a DNS server

    Quote Originally Posted by bakegoodz View Post
    DNSmasq is a DNS and DHCP server. It's a pretty easy to setup DNS Caching server. Compared to BIND which has a pretty hard learning curve. I would recommend using just DHCP server if you just want DHCP. It isn't much harder to setup. I see that you removed network manager, so you will need to use the Ubuntu server's method for network settings. Which is in /etc/network/interfaces. Example:

    Reboot to update resolv.conf or do it manually
    Code:
    apt-get install isc-dhcp-server
    cd /etc/dhcp/
    mv dhcpd.conf dhcpd.backup
    edit /etc/dhcp/dhcpd.conf
    Code:
    # /etc/dhcp/dhcpd.conf
    ddns-update-style none;
    default-lease-time 3600;
    max-lease-time 7200;
    authoritative;
    log-facility local7;
    
    subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.11 192.168.1.100;
    option routers 192.168.1.1;
    option domain-name-servers 8.8.8.8;
    }
    So resolv.conf is only used for the server's DNS address, the clients DNS is given by the DHCP server set by dhcpd.conf under

    Code:
    option domain-name-servers

    I'm slowly getting to grips with these concepts. You are saying, isc-dhcp-server gives the DNS names I enter manually into dhcpd.conf to the clients on the LAN when it's configured with that option.

    I'm not sitting at my server now so I can't check, but on my old machine, dnsmasq (like you call it, a DNS caching server) catered for the DNS requests from the LAN clients. I want to do that now on my new box as well.

    When I first found dnsmasq 5 years ago and started using it, I liked it compared to the other options available but figured that it would probably become redundant as linux brought out simpler DNS and DHCP servers - is that what has happened? Or am I still looking at dnsmasq as the best option here?

    I see you favour the google dns. Me too - that and OpenDNS.
    Last edited by ahardy66; August 13th, 2012 at 05:18 PM. Reason: still standing on the opposite side of the road from you

  4. #14
    Join Date
    Apr 2007
    Beans
    26

    Re: dhclient dns info from ISP not reaching resolvconf

    I'm not at home right now but despite getting excited by the possible answers you guys have given, I just realised that neither actually helps the problem I've got right now -

    I'm not running dnsmasq and apart from a brief period of a couple of hours over the weekend, dhclient is not able to pass the ISP's DNS info into resolvconf. Something is blocking it.

    From previous experience I'd say I've probably foobar'd it myself in the config, but if I have, it's sure as ever not obvious.

  5. #15
    Join Date
    Apr 2006
    Beans
    417

    Re: dhclient dns info from ISP not reaching resolvconf

    The main difference between Ubuntu Desktop and Server is that Desktop has a graphical manger and server does not. You can setup any server package on the desktop version. It used to be that Network Manager modified /etc/network/interfaces file, but now it works independently. So Ubuntu has 2 ways to configure network settings and some programs are only compatible with one of the configuration methods. Which is why if you use Ubuntu Desktop for server packages you may have to uninstall Network Manger.

    You can get DNS from anywhere, unless you have a crazy ISP that blocks port 53. The DHCP client or Network Manger will set the /etc/resolv.conf DHCP Server will tell the DHCP clients to use any DNS server that you set in dhcpd.conf, it doesn't care what the server is using. You don't have to get DNS from your ISP, all DNS servers get their updates either directly from the Root Servers or update from another DNS server. There are reasons to be particular, for instance using OpenDNS's filtering feature, or you have special needs to have custom DNS for your LAN. For instance my wireless router runs DNSmasq and I can reach my computers by private DNS name instead of by IP address. My routers DHCP server tells DHCP clients to use the routers IP address for DNS and the router gets DNS updates from OpenDNS.
    Last edited by bakegoodz; August 13th, 2012 at 05:54 PM.

  6. #16
    Join Date
    Apr 2007
    Beans
    26

    Re: dhclient dns info from ISP not reaching resolvconf

    Quote Originally Posted by bakegoodz View Post
    The main difference between Ubuntu Desktop and Server is that Desktop has a graphical manger and server does not. You can setup any server package on the desktop version. It used to be that Network Manager modified /etc/network/interfaces file, but now it works independently. So Ubuntu has 2 ways to configure network settings and some programs are only compatible with one of the configuration methods. Which is why if you use Ubuntu Desktop for server packages you may have to uninstall Network Manger.

    You can get DNS from anywhere, unless you have a crazy ISP that blocks port 53. The DHCP client or Network Manger will set the /etc/resolv.conf DHCP Server will tell the DHCP clients to use any DNS server that you set in dhcpd.conf, it doesn't care what the server is using. You don't have to get DNS from your ISP, all DNS servers get their updates either directly from the Root Servers or update from another DNS server. There are reasons to be particular, for instance using OpenDNS's filtering feature, or you have special needs to have custom DNS for your LAN. For instance my wireless router runs DNSmasq and I can reach my computers by private DNS name instead of by IP address. My routers DHCP server tells DHCP clients to use the routers IP address for DNS and the router gets DNS updates from OpenDNS.
    OK. Well, my ISP is good - no ports blocked. It's British Telecom. Their name servers have a really bad reputation though, so at the end of the day, I might not use them.

    However dhclient/DHCP is still not working with resolvconf and I'm not happy just going with it when I know it's foobard.

    I have de-installed network-manager, and dnsmasq.

    I don't think I have any other packages interfering with it, but maybe I don't know what to look for.

    I also edited /etc/hosts and /etc/network/interfaces but in a sane way as I had them on my debian box earlier to provide the same setup and they look like they should according to what you've said too.

    I mean, let's forget about the LAN on eth1 for the moment - I just want to get eth0 up and running getting it's config sorted via DHCP from the dsl modem and the ISP, and fix whatever spanner is currently in the works.
    Last edited by ahardy66; August 14th, 2012 at 11:37 AM.

  7. #17
    Join Date
    Apr 2006
    Beans
    417

    Re: dhclient dns info from ISP not reaching resolvconf

    Honestly I'm a little perplex by resolv.conf update mechanism sometimes, I've had it not work right too. I know how to set it statically, if you edit /etc/resolvconf/resolv.conf.d/head it will set /etc/resolv.conf from the name server from that file.

  8. #18
    Join Date
    Apr 2007
    Beans
    26

    Re: dhclient dns info from ISP not reaching resolvconf

    I just got back to my server and figured I'd give it a last ditch attempt to resolve the resolv.conf crisis

    I hadn't done a reconfigure of the resolvconf package after removing the dnsmasq package.

    Just did and it sorted the problem out, why, I don't know.

    Have to re-install dnsmasq now and hope it doesn't go belly-up again.

  9. #19
    Join Date
    Apr 2007
    Beans
    26

    Re: dhclient dns info from ISP not reaching resolvconf

    Quote Originally Posted by papibe View Post
    Hi ahardy66.

    My first guess is that you are using the Desktop Edition.

    12.04 introduced a dnsmasq plugin for Network-Manager. It works great for is intended to do, but it is incompatible with other DNS packages like dnsmasq and bind (read here).

    If you are committed to use the Desktop Edition, you would need to unisntall Network-Manager and manage the network using config files.

    On the other hand, the server edition does not have this problem.

    Let us know how it goes.
    Regards.
    Hi @papibe

    i cant find anything to distinguish the full dnsmasq from the plug-in dnsmasq for network-manager that you mention.

    i can only see dnsmasq and dnsmasq-base as packages in the package repositories I have setup. Should i be looking in some particular server platform repository in my sources.list ? Doesn't look to me from a quick check that the sources.list has different reposoitories for server & desktop versions.

  10. #20
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: dhclient dns info from ISP not reaching resolvconf

    If you are using the desktop version, removing network manager, may solve your problem. Or you can download the server iso here, and restart without all the extra cruft the desktop version adds.
    Last edited by cariboo; August 20th, 2012 at 02:04 AM. Reason: added link to sever iso

Page 2 of 3 FirstFirst 123 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
  •