[Pdns-dev] [dns-operations] dns response rate limiting (DNS RRL) patch available for testing
Peter van Dijk
peter.van.dijk at netherlabs.nl
Fri Jun 22 09:52:46 CEST 2012
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/
More information about the Pdns-dev
mailing list