[dnsdist] Trafic redirect via ports

bert hubert bert.hubert at powerdns.com
Thu Mar 23 12:29:35 UTC 2017

On Thu, Mar 23, 2017 at 09:51:09AM +0100, Thibaud Dublé wrote:
> The first idea was to send traffic to the other dnsdist for "pool1" on port 5353 and traffic for "pool2" on port 5354,
> but it looks like it is impossible to add Pool Rules to a specific IP:port.

Hi Thibaud,

I am a bit confused. I think I know what you mean, but perhaps can you

> Ideally, the pool rule config would look like this :
> bind1NMG = newNMG()
> bind1NMG:addMask("")
> bind1NMG:addMask("")
> bind1NMG:addMask("")

So you want to add source port selection to the rule?

Are you sure traffic will always come in from that source port? Usually that
is not the case as source ports tend to be dynamic.

If this is what you want, today you could do that with a Lua selection rule:
function luarule(dq)
                return DNSAction.Pool, "bind" 
                return DNSAction.Pool, "bind2"    

And then:
addLuaAction("", luarule)

You may need to change this a little bit to compensate for typos or errors,
but this is the idea.

Good luck - if this really solves your problem we could make a direct rule
for it. Please let us know.


More information about the dnsdist mailing list