[dnsdist] Multiple IP Addresses - Different Pools

Chris lists at shthead.net
Wed Apr 19 05:26:02 UTC 2017


On 19/04/2017 12:17 PM, Daniel Oakes wrote:

> How do I get requests to IP1 to poolA and IP2 to poolB?

Hi,

If IP1 is 1.1.1.1 and IP2 is 1.1.1.2:

poolA = newNMG()
poolA:addMask("1.1.1.1/32")
poolB = newNMG()
poolB:addMask("1.1.1.2/32")

addAction(NetmaskGroupRule(poolA, false), PoolAction("poolA"))
addAction(NetmaskGroupRule(poolB, false), PoolAction("poolB"))

Obvioulsy if you have more IP's for poolA or poolB you can add further 
IP's as needed, eg.:

poolA = newNMG()
poolA:addMask("1.1.1.1/32")
poolA:addMask("2001:DB8::1/128")
poolA:addMask("1.1.1.5/32")
....


More information about the dnsdist mailing list