[dnsdist] Editing TTLs for spoofed responses

Holger Hoffstätte holger at applied-asynchrony.com
Sun Nov 22 11:53:50 UTC 2020


On 2020-11-22 12:22, Holger Hoffstätte via dnsdist wrote:
> - It does not seem to work:
> 
> $dnsdist>o={ttl=3600}
> $dnsdist>a=SpoofAction("192.168.100.223", o)
> Error: Unable to convert parameter from table to N5boost8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE>
> 
> Any hints?

Surprisingly this works:

   SpoofAction("192.168.100.223", "192.168.100.223", {ttl=300})

$dig ragnarok | grep 300
ragnarok.		300	IN	A	192.168.100.223
ragnarok.		300	IN	A	192.168.100.223

It's all I wanted, and even more so. :^)

The response still won't be intercepted as I originally expected, but
specifying fake TTLs up front is perfectly fine as well and actually
even better.

Looking at the code in dnsdist-lua-actions.cc#1605 I suspect a subtle bug
with the handling of the variant of the various things that are supposed
to be in there, but I don't see it right now.

cheers
Holger


More information about the dnsdist mailing list