On Tue, Oct 29, 2024 at 11:30:36PM +0000, Greg Owen via Pdns-users wrote:

> On Tue, Oct 29, 2024 at 10:14:29PM +0000, Djerk Geurts via Pdns-users wrote:
> > Is there a way to return NXDOMAIn instead of a valid response?
> > 
> > test IN LUA CNAME 
> > "view({{{'10.0.0.0/16'},{‘ns0.internal.domain.com.'}},{{'0.0.0.0/0'},{''}}})”
> > 
> > I would like to return NXDOMAIN instead of SERVFAIL for sources outside 
> > 10.0/16.
> 
> I've got some old code that does it like this:
> 
>       name.rcode = pdns.NXDOMAIN
>       return true;
> 
> This is in function preresolve(name). You can look at the code at 
> https://github.com/gowenfawr/dnSentry/blob/main/dnSentry.lua
> 
> -- 
>     gowen - Greg Owen - go...@swynwyr.com

I sense some confusion between Lua records in the authoritative server
and Lua scripting in the recursor. Same language, different beasts.

        -Otto
_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to