[dnsdist] modify response ip address

bert hubert bert.hubert at powerdns.com
Tue Aug 1 21:49:07 UTC 2017


On Wed, Aug 02, 2017 at 12:19:35AM +0300, Александр wrote:
> Hello everyone.
> I've read documentation, but, not being very familiar with lua, didn't get
> some parts of it. And didn't find examples in documentation about modifying
> response packets based on their contents.

This is correct. For now, dnsdist does not support modifying answer packets
based on the answer contents. This may change, but for now this is how it
is.

However, our other product, the PowerDNS Recursor, has a postresolve() hook
which does exactly what you need. You could also configure the recursor to
forward all queries to your target nameserver, and achieve the same thing.

Good luck!

	Bert

> 
> My question is, is it possible with current state of dnsdist to spoof A and
> AAAA addresses in response packets based solely on A and AAAA fields?
> 
> For example:
> Dns query for some random domain (domain is really random, so I can't regexp
> domain name) returns A x.y.z.[1-12] and AAAA xxxx:yyyy:zzzz::[1-12]
> (radom ip from 12 possible for each type)
> 
> If response matches those addresses I want them to be replaced with some
> other addresses q.p.y.[1-12]
> and AAAA qqqq:pppp:yyyy::[1-12] (also randomly from 12 possible for each
> type)
> 
> If it's possible would someone mind to give at least a basic snippet of
> code, that may realize this functionality, thanks in advance.
> 
> _______________________________________________
> dnsdist mailing list
> dnsdist at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/dnsdist


More information about the dnsdist mailing list