Is there a way to log all DNS requests? somehow build a table of
www.example.com 192.168.0.25 1/11/2016 13:56
the IP should be the IP of the client that requested it
system logging add action=memory target=dns
20:15:47 dns local query: #33347 cloud.mikrotik.com. A
20:15:47 dns done query: #33347 cloud.mikrotik.com 91.188.51.139
...
Well, now it works... at least with 6.37.4. Found out accidentally the other day while trying to send everything but debug to remote log server.
Results with:Code: Select allsystem logging add action=memory target=dns
20:15:47 dns local query: #33347 cloud.mikrotik.com. A
20:15:47 dns done query: #33347 cloud.mikrotik.com 91.188.51.139
...
So at home I've been using it like this (logs only bold lines in the above log):08:16:23 dns,packet --- got query from 192.168.0.100:34308:
08:16:23 dns,packet id:dd0 rd:1 tc:0 aa:0 qr:0 ra:0 QUERY 'no error' 2
08:16:23 dns,packet question: http://www.mikrotik.com:A:IN
08:16:23 dns,packet additional:
08:16:23 dns,packet <:UNKNOWN (41):0=rawbytes:0>
08:16:23 dns query from 192.168.0.100: #62620 http://www.mikrotik.com. A
08:16:23 dns done query: #62620 dns name exists, but no appropriate record
08:16:23 dns,packet --- sending reply to 192.168.0.100:34308:
08:16:23 dns,packet id:dd0 rd:1 tc:0 aa:0 qr:1 ra:1 QUERY 'no error'
08:16:23 dns,packet question: http://www.mikrotik.com:A:IN
08:16:23 dns,packet answer:
08:16:23 dns,packet <www.mikrotik.com:A:6181=159.148.147.196>
system logging add action=memory target=dns,!packet
/system logging action set 3 bsd-syslog=yes remote=<syslog-server> remote-port=<syslog-port> syslog-facility=syslog
/system logging add action=remote topics=!debug