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

Thread: Need dns cache-dnsmasq

  1. #11
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    12,752
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Need dns cache-dnsmasq

    In that case it looks set up correctly. I don't know what could be the issue, I don't see anything.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  2. #12
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,211
    Distro
    Ubuntu Development Release

    Re: Need dns cache-dnsmasq

    In post #8 above when you said:
    When I ping google.com from the client I get the same 83 ms as many times as I want to bother.
    Did you mean to say "dig" instead of "ping", as in post #1? Caching or not will not influence "ping" but will repeated "dig"s.

  3. #13
    Join Date
    Jun 2012
    Location
    Isaan (the REAL Thailand)
    Beans
    172
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Need dns cache-dnsmasq

    Hmm, I have been using ping as a test on the client machine. I thought dig was a linux command. In any case I just did dig to google on the server and no evidence of caching. I believe the problem is one of configuration of nameserver listing. dnsmasq default goes to resolv.conf for list of recursive nameservers. The tutorial ends with adding several. Having tried this, I notice that on re-boot, the list is purged and the only one appearing is 192.168.1.1 which it is picking up automatically. There seem to be ways to adjust this. There is a choice to enter a list in dnsmasq.conf and comment out resolv.conf, for example. I wanted to get the basic setup working before adding variables, so now I can try adjusting, and see what happens.

  4. #14
    Join Date
    Jun 2012
    Location
    Isaan (the REAL Thailand)
    Beans
    172
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Need dns cache-dnsmasq

    I saw a man page for resolvconf in ubuntu that stated that dnsmasq would go to resolv.conf for nameservers (added s for resolvconf) and that would look to those listed in /etc/network/interfaces. It gave an example of a single nic server with a static ip. So my first attempt was to list nemerser xx.xx.xx.xx under eth1 as it had a staic ip. This killed outside access. `dig google.com' `no servers could be reached' So removed those entries.
    After trying several variations, I found that dnsmasq default goes to /etc/resolv.conf for a list of nameservers. resolv.conf queries /etc/network/interfaces and will add those listed there. If eth0 is static, then all is good, but if eth0 is dhcp, then there is no way to configure effectively using this approach.
    http://manpages.ubuntu.com/manpages/...olvconf.8.html
    This seems to discuss this, but is beyond my level of understanding at this point. I may be wrong but it appears that dnsmasq doesn't fully support caching in the case where eth0 is dynamic rather than static. I will continue to experiment.

  5. #15
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    12,752
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Need dns cache-dnsmasq

    Why do you have dhcp on eth0? Is that a requirement from the ISP of the interface is directly on the internet, or it's connected to your router?

    If it's connected to your router set up static IP which you should always do with servers on all interfaces. That way you are sure it will never change. Just use an IP outside of the router dhcp range. And when using static you can add the setting for eth0:
    dns-nameservers x.x.x.x y.y.y.y

    That way the server (and dnsmasq) will use those nameservers.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  6. #16
    Join Date
    Jun 2012
    Location
    Isaan (the REAL Thailand)
    Beans
    172
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Need dns cache-dnsmasq

    Great idea! Only problem: at home I can't change settings on the router/modem. At school, I believe there is some flexibility as it's a near enterprise sort of thing. I don't recall, but I believe it may not allow a static ip either. As I recall, I set the dhcp range to one ip number, that must have been the reason. School starts in about 10 days for teachers, and I'll have some student free days to make adjustments. As I said, not caching isn't the end of the world. Having the samba file server should be a huge hit with the staff. That's working well.

  7. #17
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    12,752
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Need dns cache-dnsmasq

    For using static IP on the server you don't need to do anything on the router end. It helps to know the range it is issuing but you can try. So, having complete access to the router config is not always needed.

    For example, when the router is 192.168.1.1 usually it doesn't start issuing addresses right away from 192.168.1.2. Usually they start at 192.168.1.30 or 192.168.1.100, etc.

    So, you can use 192.168.1.2 as a static IP for the server for example, and see how it works.

    But if you need to do some port forwarding or similar on the router, to enable some kind of outside access, that might be a problem if you don't have full access.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  8. #18
    Join Date
    Jun 2012
    Location
    Isaan (the REAL Thailand)
    Beans
    172
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Need dns cache-dnsmasq

    So if i set the eth0 in network/interfaces to static and assign something in range, that will work? Interesting. Sounds good. Then I can list nameserver xx.xx.xx.xx under eth0 and it should work. For some reason, I had the idea that the dhcp of the router would force eth0 to whatever ip the router wanted to assign it.Yes the router at home is totally locked. I tried re-flashing the firmware to get around that, but ended up with a bigger problem. The one at school has access to port forwarding, filtering, etc. That's why I don't really need an in server firewall.

  9. #19
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    12,752
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Need dns cache-dnsmasq

    Correct, it will receive an automatic IP only if the network card of the client is set to use automatic dhcp. If it's on static, it ignores any dhcp servers running on the network.

    And just a reminder, the command you need in /etc/network/interfaces is not nameserver, it's:
    dns-nameservers x.x.x.x y.y.y.y

    So it will look something like:
    Code:
    auto eth0
    iface eth0 inet static
       address 192.168.1.2
       netmask 255.255.255.0
       gateway 192.168.1.1
       dns-nameservers x.x.x.x y.y.y.y
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  10. #20
    Join Date
    Jun 2012
    Location
    Isaan (the REAL Thailand)
    Beans
    172
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Need dns cache-dnsmasq

    Ok, do I list the loopback? Do I list 192.168.1.1, or start out with the outside servers like the isp's and some others like the other isp's (home and school are not same) and opendns, google, etc?

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
  •