<div dir="ltr">I'm working on creating a highly-available group of BIND servers to serve as caching nameservers with RPZs built from various threat intel feeds to help prevent unwanted activity on our network.<div><br></div><div>The architecture I've been working with so far is a pair of front-end proxy servers running keepalived to share a virtual IP and PowerDNS's dnsdist as the actual proxy.  The proxies set ECS to the client's IP address and pass the request to one of four back-end caching BIND 9.12 servers.</div><div><br></div><div>That all works beautifully, but when a client has one of their requests rewritten based on a threat feed, we want to know about it so that we can investigate/remediate that client.</div><div><br></div><div>When the rewrites are logged via the 'rpz' category, they're logged with the IP address of the proxy, not the client.  I can get the ECS information in the query log, but there's nothing in the query log (or is there?) that indicates that a query was rewritten.</div><div><br></div><div>Is there any way to get the ECS information in the RPZ log?  Failing that, suggestions on how to accomplish this would be greatly appreciated.</div><div><br></div><div>Thanks!</div><div><br></div><div>-Brian</div></div>