Lua actions in rulesΒΆ

While we can pass every packet through the blockFilter() functions, it is also possible to configure dnsdist to only hand off some packets for Lua inspection. If you think Lua is too slow for your query load, or if you are doing heavy processing in Lua, this may make sense.

To select specific packets for Lua attention, use addLuaAction() or addLuaReponseAction().

A sample configuration could look like this:

function luarule(dq)
  if(dq.qtype==35) -- NAPTR
    return DNSAction.Pool, "abuse" -- send to abuse pool
    return DNSAction.None, ""      -- no action

addLuaAction(AllRule(), luarule)