[Pdns-users] wpad filtering

Remi Gacogne remi.gacogne at powerdns.com
Thu Nov 30 13:51:46 UTC 2017

Hi Mario,

On 11/30/2017 11:52 AM, Mario Caruso wrote:
> I am trying to write a lua rule to somehow filter/capture 
> the wpad  like dq.qname (http://allievi.sssup.it/techblog/archives/81)
> in my test environment (debian stretch and recursor version 
> 4.1.0~rc3-1pdns.stretch) I have this rule : 
>    -- US-CERT TA16-144A.
>       if (dq.qname:isPartOf(newDN("wpad")))
>       then
>          dq.rcode = 0
>          dq:addAnswer(pdns.A, "")
>          return true;
>       end
> but this doesn't seem to work, maybe I am misinterpreting
> the isPartOf method , or maybe I should use :toString and 
> then use lua pattern matching.

isPartOf() returns true if the name is a sub-domain of the one passed in
parameter, so here it would match any domain under the hypothetic .wpad
TLD, which is not what you want. Lua pattern matching would be one of
the various ways to do that, yes.

Kind regards,
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20171130/9eb27ed7/attachment.sig>

More information about the Pdns-users mailing list