[Pdns-users] Ongoing DNS Denial of Service attacks & 3.6.0
    Peter van Dijk 
    peter.van.dijk at netherlabs.nl
       
    Mon Jan  5 10:37:28 UTC 2015
    
    
  
Hello Ciro,
On 03 Jan 2015, at 5:53 , Ciro Iriarte <cyruspy at gmail.com> wrote:
> Hi Bert!, did the example made it to the documentation?, unluckily the provided link is dead now.
If you mean the pastie-link, it appears to work right now. Copying here for our archives:
function endswith(s, send)
         return #s >= #send and s:find(send, #s-#send+1, true) and true or false
end
blocklist={"yazisu.gzkthg.com.", "www.sidear.cn.", "www.qe120.com."}
function preresolve ( remoteip, domain, qtype )
        for k,v in pairs(blocklist) do
                if endswith(domain, v)
                then
                        return pdns.DROP, {}
                end
        end
        return pdns.PASS, {}
end
Kind regards,
-- 
Peter van Dijk
Netherlabs Computer Consulting BV - http://www.netherlabs.nl/
    
    
More information about the Pdns-users
mailing list