Hello,
On Jun 20, 2012, at 18:37 , Peter van Dijk wrote:
> This branch has been merged into our SVN.
I have added constants for REFUSED and NOERROR and a few others.
This script now works when you put it in a file and set lua-prequery-script to
that file:
function prequery ( dnspacket )
-- pdnslog ("prequery called for ".. tostring(dnspacket) )
qname, qtype = dnspacket:getQuestion()
pdnslog ("q: ".. qname.." "..qtype)
if qtype == pdns.A and qname == "www.domain.com"
then
pdnslog ("calling dnspacket:setRcode")
dnspacket:setRcode(pdns.REFUSED)
pdnslog ("returning true")
return true
end
pdnslog ("returning false")
return false
end
just replace the 'if' with your rate limiting logic and you're done ;)
Kind regards,
--
Peter van Dijk
Netherlabs Computer Consulting BV - http://www.netherlabs.nl/
_______________________________________________
Pdns-dev mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-dev