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

Logging DNS lookups?

Discussion in 'DD-WRT Firmware' started by ptolemy, May 10, 2006.

  1. ptolemy

    ptolemy Network Guru Member

    Is it possible to somehow log all dns lookups (if DNS Masq is enabled)?
     
  2. ptolemy

    ptolemy Network Guru Member

    Anyone?
     
  3. AliM

    AliM Network Guru Member

    Just enter log-queries in the additional DNS options field.
     
  4. ptolemy

    ptolemy Network Guru Member

    Ah, ok.
    Where does it write the log entries?
    /tmp/var/log/messages seems to be empty.
    I've also tried sending dnsmasq a SIGUSR1-signal.


    Also I've enabled Logging in the web-interface, but it doesn't seem to log anything. The Incoming and Outgoing logs are both empty.
     
  5. will792

    will792 Network Guru Member

    The only way to log DNS lookups that I know of is to start DNSMasq from a command prompt with a flag for logging (cannot recall what it is but it is in the manual). Posting:

    http://www.broadbandreports.com/forum/remark,15082337

    You can possible change startup script to include this DNSMasq flag or have a script that kills DNSMasq and restarts with the new parameters. It is kludgy.

    Actually check this DNSMasq parameter:
    # For debugging purposes, log each DNS query as it passes through
    # dnsmasq.
    #log-queries

    from:
    http://thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example
     
  6. ptolemy

    ptolemy Network Guru Member

    Thanks, I'll try that.

    Where can I find the syslog?
     
  7. will792

    will792 Network Guru Member

    No so sure. I have syslogd enabled with log being sent to a PC with WallWatcher. You can use web interface to look at the log or check source for /www/Log_outgoing.asp file where it gets log data.

    If you start DNSMasq from a command line with -D option it logs to console (I guess stdout). You can always redirect output to a file.
     
  8. ptolemy

    ptolemy Network Guru Member

    I got it working! :)
    I had to enable Administration/Services/System Log.
    Then all I had to do was to put "log-queries" in Administration/Management/DNSMasq/Additional DNS Options.

    The log is here: /tmp/var/log/messages

    Stupid quesion, but is this stored in flash memory or in ram?
     
  9. Disman_ca

    Disman_ca Super Moderator Staff Member Member

    RAM
     

Share This Page