I have a number of RPZs and want to log to file when an RPZ action
fires. But the postresolve method doesn't have get the DNSQuestion.
Here are some example log lines that don't fire an RPZ action:
Jul 30 22:32:27 system pdns_recursor[4789]: washington.voip.ms. prerpz
Jul 30 22:32:30 system pdns_recursor[4789]: washington.voip.ms. 10.3.5.104
rcode is 2
Jul 30 22:33:13 system pdns_recursor[4789]: get-maps-bx.g.aaplimg.com. prerpz
Jul 30 22:33:13 system pdns_recursor[4789]: get-maps-bx.g.aaplimg.com.
10.3.5.119 rcode is 0
And here are lines that trigger an RPZ action. As you can see, the
postresolve function never gets fired.
Jul 30 22:36:12 system pdns_recursor[4789]: evidaac.com. prerpz / rcode 0
Jul 30 22:36:17 system pdns_recursor[4789]: num.to. prerpz / rcode 0
Here's my RPZ definition:
rpzFile("/path/to/phishtank-online-verified/zone.conf", {defpol=Policy.Custom,
defcontent="fishtank.local.blockpage.server", policyName='FishTank'})
And here's the lua script:
function prerpz(dq)
pdnslog(dq.qname:toString() .. ' prerpz')
return false
end
function postresolve(dq)
pdnslog(dq.qname:toString() .. " " .. dq.remoteaddr:toString() .. " rcode is
" .. dq.rcode, pdns.loglevels.All)
return false
end
Any ideas how I can configure my lua scripts to log when an RPZ action
fires?
Much obliged!
Dave
_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users