[dnsdist] Matching DNS server IP in request

Remi Gacogne remi.gacogne at powerdns.com
Tue May 21 07:26:40 UTC 2024


Hi Aleš,

On 17/05/2024 18:17, Aleš Rygl via dnsdist wrote:
>      I would need to virtualy split a single dnsdist instance in the the 
> way, that clients sendig request to a particular IP od DNS dnsdist 
> (listening on multiple IPs) are sent to a dedicated pool. I could start 
> another dnsdist process bound to the secondary IP on the server but I 
> think there must be a more lelegant wa to do it ;-) It should work this 
> way:
> 
>      client1 ---> DNS req. to dnsdist IP1 ---> pool-A ---> cache-A ---> 
> backend A
>      client2 ---> DNS req. to dnsdist IP2 ---> pool-B ---> cache-B ---> 
> backend B
> 
>      Is there a way to match a destination IP of the client's request in 
> a rule in order to send it to a pool? I can not use client's IP here.

Unless I'm mistaken you should be able to do that with NetmaskGroupRule 
[1], setting the "src" parameter to false to match the destination 
instead of the source.

[1]:
https://dnsdist.org/reference/selectors.html?highlight=netmaskgroup#NetmaskGroupRule

Best regards,
-- 
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20240521/0b5ec827/attachment.sig>


More information about the dnsdist mailing list