[dnsdist] Query current config of dynBlockRulesGroup
remi.gacogne at powerdns.com
Thu Aug 24 09:58:39 UTC 2023
On 24/08/2023 11:47, Ben Kaplan via dnsdist wrote:
> 1. We're searching for how to query the current values of
> dynBlockRulesGroup (using ebpf) via the console.
> Once the rule kicks in we can see the IP blocked and the warning
> message when running "showDynBlocks()".
> However, we can't find any way to query for the actual values and
> rules configured in "function maintenance()".
The dynBlockRulesGroup class has a 'toString' method which describes the
current configuration . So if you have declared it with, for example:
dbr = dynBlockRulesGroup()
dbr:setRCodeRate(DNSRCode.NXDOMAIN, 5, 5, "Exceeded NXD rate", 60)
you can later retrieve the current configuration via:
Query rate rule:
Response rate rule:
- Non-Existent domain: Apply the global DynBlock action for 60 seconds
when over 5 during the last 5 seconds, reason: 'Exceeded NXD rate'
> 2. When running "addDynBlocks(addresses, message[, seconds=10[,
> action]])" from the console when dnsdist already has the same rule
> configured. will this create a second rule or modify the value of
> the existing rule?
Modify, unless the existing rule was still valid for a longer time than
the one you are trying to insert.
PowerDNS.COM BV - https://www.powerdns.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 488 bytes
Desc: OpenPGP digital signature
More information about the dnsdist