1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Using external DNS server for name resolution for IP Traffic

Discussion in 'Tomato Firmware' started by mpthompson, Mar 4, 2014.

  1. mpthompson

    mpthompson Reformed Router Member

    On my home LAN I'm using a Raspberry Pi running bind for DNS services for multiple subnets. Ideally, I would like my TomatoUSB (running shibby's latest) to use the this external DNS server for reverse resolution of IP addresses to names when viewing IP Traffic reports. I believe I have TomatoUSB correctly configured as from the command line I can do something such as:

    ---------------------
    # nslookup 192.168.0.12
    Server: 0.0.0.0
    Address 1: 0.0.0.0

    Name: 192.168.0.12
    Address 1: 192.168.0.12 newton.home.lan
    ---------------------

    This correctly does the reverse lookup of the IP address 192.168.0.12 to the name "newton.home.lan".

    Is there a configuration setting to get TomatoUSB to correctly resolve IP addresses to names in the IP Traffic reports using reverse DNS lookups?

    Thanks,

    Mike
     
  2. koitsu

    koitsu Network Guru Member

    Edit: I'll revamp what I said, because my initial interpretation (since you went on about "Raspberry Pi running BIND" and showing nslookup output) was that you were trying to figure out how to actually maintain a BIND-based DNS server / make zones with proper data in them (PTR records, etc.). I apologise for my tone, but you can surely understand how I interpreted what you said the way I did.

    Some DNS resolution within TomatoUSB relies entirely on local data on the router itself (ex. Device List won't show "Names" unless you use dnsmasq natively on the router). It really depends on how the underlying code is written; not all of it is using obvious uClibc resolver bits.

    I run a local BIND-based DNS server on my FreeBSD box on my LAN, and to get the router to use it exclusively, I had to 1) set the DNS server in Basic / Network / LAN / Static DNS, 2) disable "Use internal DNS" in Advanced / DHCP/DNS, 3) disable IPv6 (else the ISP-delegated DNS servers took preference), 4) reboot the router (if toggling IPv6 support) otherwise some daemons would still bind to IPv6 addresses and DNS resolution would act very wonky (I had to do packet captures to see what was going on; utterly insane DNS PTR record lookups until this was done). That got me an /etc/resolv.conf (on the router itself) of just the IP address of the FreeBSD box.
     
    Last edited: Mar 4, 2014
  3. mstombs

    mstombs Network Guru Member

    Tomato uses dnsmasq as a caching dns forwarder, and a dhcp server. Most folk like to configure dnsmasq to use its knowledge dhcp leases and configured static leases, and it can be set not to forward dns requests for local lan hosts. I have seen different behaviour using nslookup on the router vs a connected computer, I concluded that lookups on the router itself use uclibc routines and bypass dnsmasq just using the contents of /etc/resolv.conf. I suspect tomato is specifically using dnsmasq to take advantage of its local name knowledge, so it might be dnsmasq config required to ensure it passes all requests on.
     

Share This Page