Log Refused DNS Queries in dnsdist using DNSTap

235 Views Asked by At

I have a simple DNSDIST Setup with DNSTap configured.

What I want is to be able to LOG DNS Queries that were blocked. Right now, I'm only seeing responses of DNSTap with successful queries + Client Queries of the the domains that were blocked (before actually being blocked which doesnot help).

Here is my configuration


newServer({address="1.1.1.1",name="dns1", qps=1})
newServer({address="9.9.9.9",name="dns2", qps=1})

rl = newFrameStreamTcpLogger("127.0.0.1:6000")

addResponseAction("example.com", DropResponseAction())
addResponseAction("download.com",RCodeAction(DNSRCode.REFUSED))
addAction("test.com",DropAction())


addAction(RCodeRule(5), DnstapLogAction("dnstaction", rl))
addResponseAction(AllRule(), DnstapLogResponseAction("dns", rl))
addAction(AllRule(), DnstapLogAction("dnsdixtaction", rl))

0

There are 0 best solutions below