[dnsdist] How to modify the DNS response from an upstream server?
remi.gacogne at powerdns.com
Tue Oct 13 15:34:35 UTC 2020
On 10/12/20 1:09 PM, Aleksey Chudov via dnsdist wrote:
> Is there a way to modify the DNS response from an upstream server? I
> especially want to add the RA flag (for testing purposes) if the RD flag
> is set. If this is not possible, I can change the source code. Please
> lead me to the right place in the source code where it is more appropriate.
There is very limited support for editing the content of responses from
dnsdist, but luckily you should be able to do what you want using a bit
return DNSResponseAction.HeaderModify, ""
This code declares a Lua function that will set the RA bit to true, and
return a value indicating that the header has been modified. This
function can be passed to LuaResponseAction so it will be executed for
selected responses. The example below uses the AllRule() selector that
will apply it to all responses, but you could of course use a different
Hope that helps,
PowerDNS.COM BV - https://www.powerdns.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 488 bytes
Desc: OpenPGP digital signature
More information about the dnsdist