Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Can't get dnsmasq to log queries

Discussion in 'ASUS Wireless' started by sbsnb, Sep 13, 2017.

  1. sbsnb

    sbsnb Occasional Visitor

    Joined:
    Aug 9, 2017
    Messages:
    31
    Using Merlin 380.68. Added log-queries line to /jffs/configs/dnsmasq.conf.add and service dnsmasq_restart. Still nothing in logs. Added log-facility=/tmp/mnt/sda1/dnsmasq.log to dnsmasq.conf.add and restart. Nothing. I tried creating the dnsmasq.log file and setting it to RW for everyone. Nothing. I know dnsmasq.conf.add is being processed because I have a no-resolv line that generates a warning in the syslog. What am I missing?
     
  2. sbsnb

    sbsnb Occasional Visitor

    Joined:
    Aug 9, 2017
    Messages:
    31
    I noticed when you change dnsmasq settings in the UI the following log entries are generated:
    Code:
    Sep 13 09:19:41 rc_service: httpd 560:notify_rc restart_dnsmasq
    Sep 13 09:19:41 custom_config: Appending content of /jffs/configs/dnsmasq.conf.add.
    But when you restart dnsmasq from a terminal the log shows no notification about appending dnsmasq.conf.add. I confirmed with /etc/dnsmasq.conf that restarting dnsmasq from a terminal does not append dnsmasq.conf.add. I was hoping this was my issue, but I tried changing some settings in the UI and applying them to trigger a restart of dnsmasq and confirmed that log-queries appears in /etc/dnsmasq.conf, but it's still not logging queries.
     
    Last edited: Sep 13, 2017
  3. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    3,510
    Location:
    UK
    I think when another forum user was doing this the other day they had the same problem because they were suppressing the dnsmasq messages in the webUI, or their log level was set incorrectly. So check the settings in the webUI.
     
  4. sbsnb

    sbsnb Occasional Visitor

    Joined:
    Aug 9, 2017
    Messages:
    31
    I set the log level to debug. Now I see the following every 5 seconds:

    Code:
    Sep 13 10:02:06 dnsmasq[1855]: 1420 127.0.0.1/47793 query[A] dns.msftncsi.com from 127.0.0.1
    Sep 13 10:02:06 dnsmasq[1855]: 1420 127.0.0.1/47793 cached dns.msftncsi.com is 131.107.255.255
    But when I manually query dnsmasq with nslookup nothing shows up in the logs. Nothing shows up except those damn windows queries checking if it's online.
     
  5. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    3,510
    Location:
    UK
    Where are you do the nslookup from, a PC? Maybe the DNS is set wrong on the PC or you are using DNS Filter.
    Code:
    C:\Users\Colin>nslookup
    Default Server:  router.asus.com
    Address:  192.168.1.1
    
    > www.google.co.uk
    Server:  router.asus.com
    Address:  192.168.1.1
    
    Non-authoritative answer:
    Name:    www.google.co.uk
    Addresses:  2a00:1450:4009:815::2003
              216.58.204.35
    
    >
     

Share This Page