<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Thanks a lot...</span><br style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I have read the code, there is a 'global' to store the ip-ratelimit.</span><br style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">There is a plan to implement ip-ratelimit filtered by IP/network?</span><br style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Something like:</span><br style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ip-ratelimit:<span> </span></span><a href="http://192.168.1.0/24" target="_blank" style="color:rgb(17,85,204);font-size:12.8px;background-color:rgb(255,255,255)">192.168.1.0/24</a><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span>200</span><br style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ip-ratelimit:<span> </span></span><a href="http://192.168.2.0/24" target="_blank" style="color:rgb(17,85,204);font-size:12.8px;background-color:rgb(255,255,255)">192.168.2.0/24</a><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span>300</span><br style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ip-ratelimit:<span> </span></span><a href="http://0.0.0.0/0" target="_blank" style="color:rgb(17,85,204);font-size:12.8px;background-color:rgb(255,255,255)">0.0.0.0/0</a><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span>50</span><br style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><div class="gmail_default" style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline">That way, we</div><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> can have<span> </span></span><div class="gmail_default" style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline">clients</div><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> with different limitations</span><div class="gmail_default" style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline">.</div>
</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-07-17 10:29 GMT-04:00 Wouter Wijngaards via Unbound-users <span dir="ltr"><<a href="mailto:unbound-users@unbound.net" target="_blank">unbound-users@unbound.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi Luiz,<br>
</p><span class="">
<br>
<div class="m_3514635152278713801moz-cite-prefix">On 07/11/2018 06:38 AM, Luiz Fernando
Softov via Unbound-users wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr"><font face="monospace, monospace">Hi,<br>
<br>
After my application changes unbound configuration, i call a
reload to put thing in order.<br>
<br>
After calling reload, I figure out that ip-ratelimit was not
changed in ip_ratelimit_list<br>
</font></div>
</blockquote>
<br>
</span><font face="monospace, monospace">Yes that is a bug! Fixed it (also
for the ratelimit and ratelimits per domain). It did not reapply
the changed values after a reload of the config file. If you
changed other infra cache parameters (like infra cache size), then
it did work, but not if it didn't. Fixed code is in the code
repository.<br>
<br>
Best regards, Wouter<br>
</font><div><div class="h5">
<blockquote type="cite">
<div dir="ltr"><font face="monospace, monospace">
<div class="gmail_default" style="font-family:monospace,monospace;display:inline"></div>
<br>
ip-ratelimit: 350<br>
ip-ratelimit-size: 4m<br>
ip-ratelimit-slabs: 2<br>
ip-ratelimit-factor: 10<br>
<div class="gmail_default" style="font-family:monospace,monospace;display:inline"></div>
<br>
<div class="gmail_default" style="display:inline">$
unbound-control get_option ip-ratelimit<br>
350<br>
<span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br>
$<span> </span></span><span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"></span><span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">unbound-control </span>ip_<wbr>ratelimit_list
+a<br>
192.168.0.1 5 limit 350<br>
<br>
</div>
</font>
<div><font face="monospace, monospace">
<div class="gmail_default" style="display:inline"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">#
change <span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ip-ratelimit</span> to
400 in unbound conf file and calls reload<br>
<div class="gmail_default" style="text-decoration-style:initial;text-decoration-color:initial;display:inline"><br>
<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">$
unbound-control reload</span></div>
<br style="text-decoration-style:initial;text-decoration-color:initial">
<div class="gmail_default" style="text-decoration-style:initial;text-decoration-color:initial;display:inline">$
unbound-control get_option ip-ratelimit<br>
</div>
400<br>
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br>
<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">#
even new users get the old ip-ratelimit</span><br>
<br>
$<span> </span></span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"></span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">unbound-control </span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ip_<wbr>ratelimit_list
+a</span><br style="text-decoration-style:initial;text-decoration-color:initial">
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">192.168.0.1
7 limit 350</span>
<br>
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br>
$<span> </span></span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"></span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">unbound-control </span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ip_<wbr>ratelimit_list
+a</span><br style="text-decoration-style:initial;text-decoration-color:initial">
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">192.168.0.1
7 limit 350</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span></span>
<br style="text-decoration-style:initial;text-decoration-color:initial">
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">192.168.0.2
15 limit 350</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span></span>
<br>
<br>
# then I call set_option, and everything is fine<br>
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">$<span> </span></span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"></span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">unbound-control </span></span></div>
set_option ip-ratelimit: 400<br>
<div class="gmail_default" style="display:inline"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ok<br style="text-decoration-style:initial;text-decoration-color:initial">
<div class="gmail_default" style="text-decoration-style:initial;text-decoration-color:initial;display:inline">$
unbound-control get_option ip-ratelimit<br>
</div>
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">400</span>
<br>
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br>
$<span> </span></span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"></span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">unbound-control </span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ip_<wbr>ratelimit_list
+a</span><br style="text-decoration-style:initial;text-decoration-color:initial">
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">192.168.0.1
8 limit </span>
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">400</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span></span>
<br style="text-decoration-style:initial;text-decoration-color:initial">
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">192.168.0.2
9 limit </span>
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">400</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span></span>
<br>
<br style="text-decoration-style:initial;text-decoration-color:initial">
<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">This
is suppose to work that way? There is a problem/BUG?
Or I'm missing something?</span>
<br>
</span></div>
</font></div>
<div><font face="monospace, monospace">
<div class="gmail_default" style="display:inline"></div>
<br>
</font></div>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>