[Pdns-dev] Lua script to run when DNS entry IS found

bert hubert bert.hubert at netherlabs.nl
Sat Oct 23 12:46:26 CEST 2010

On Sat, Oct 23, 2010 at 10:32:33AM +0100, Michael Fielding wrote:
> I would like to invert the status of the DNS database, to create a
> blacklist: for anything NOT in the DNS database, a constant entry is
> returned; for anything IN the database, NXDOMAIN is returned.

I'm a bit confused - the Lua script is in the PowerDNS Recursor, which does
not have a database.

> The nxdomain script function will be called when an entry is NOT
> found, and I could return what I need. But is it possible to
> intercept any *resolved* request and override to return NXDOMAIN?
> (Alternatively, use a preresolve function and check try to resolve
> in the script itself.)

Right now, this is not possible, but the Lua scripts will be enhanced very
shortly with a number of new hooks. One of these will allow you to override
any answer, and even change the question.

If you could elaborate a bit more, we could make sure that the new hooks
do what you need.


More information about the Pdns-dev mailing list