[Pdns-users] Disable pdns-recursor caching for a single forwarded domain
Kenneth Marshall
ktm at rice.edu
Thu Jul 20 14:37:38 UTC 2017
Hi PDNS community,
I am currently running pdns-recursor version 3.7.4 and am trying to
disable caching for a single forwarded domain. I am current trying
to use the following lua script but although being called, the
setvariable() call does not seem to turn off the caching. I would
expect each call to hit the DNS servers for the forwarded zone:
------------------nocache.lua
function endswith(s, send)
return #s >= #send and s:find(send, #s-#send+1, true) and true or false
end
function preresolve( remoteip, domain, qtype )
if endswith(domain, ".ad.rice.edu.")
then
if qtype ~= pdns.A
then
return pdns.PASS, {}
end
pdnslog("preresolve called for: "..domain, pdns.loglevels.Info)
setvariable()
end
return pdns.PASS, {}
end
------------------nocache.lua
Is this possible? I have tried the same with a postresolve() function
but it still appears to cache based on the TTL.
Regards,
Ken
More information about the Pdns-users
mailing list