<div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié., 14 de ago. de 2019 a la(s) 10:11, Daniel Tryba (<a href="mailto:d.tryba@pocos.nl">d.tryba@pocos.nl</a>) escribió:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Yes, this adds the source ip to the htable that is used to block further<br>
requests. But my experience is that if you sent a 200 OK the scans<br>
will stop for the older scanners. So you might want to add a<br>
sl_send_reply("200", "OK");<br>
before the drop.<br></blockquote><div>added! thanks<br></div><br></div><div class="gmail_attr">but:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm not sure what you are trying to say here.<br>
<br>
In my setups I have a limit of 64 requests per 2s. But I also have<br>
whitelist (with/via the permissions module) for known high traffic<br>
ipaddresses. Dimensioning the pike module for the known high traffic<br>
hosts kind of defeats the purpose of using pike to detect strange<br>
unwanted traffic. The correct numbers depend on your endpoints.<br></blockquote><div>i cannot use whitelist due my experiment are for all dinamyc ip clients<br></div><div>so what its the meaning of "depend on your endpoints" ?<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
if(src_ip!=myself && !allow_address("2", "$si", "$sp"))<br>
{<br>
   if($sht(ipban=>$si)!=$null)<br>
   {<br>
       # ip is already blocked<br>
           exit;<br>
   }<br>
<br>
   if (!pike_check_req())<br>
   {<br>
       $sht(ipban=>$si) = 1;<br>
       exit;<br>
<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> oh, also i put for scanners that:<br>
> <br>
> if($ua =~ "friendly-scanner") {<br>
>    xlog("L_ALERT", "friendly scanning incoming $rm IP:$si:$sp - R:$ruri -<br>
> F:$fu - T:$tu - UA:$ua - $rm\n");<br>
>   $sht(ipban=>$si) = 1;<br>
>    drop();<br>
> }<br>
> <br>
> so i ban the ip where the friendly scanner are made for a while, it's that<br>
> correct?<br>
<br></blockquote><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div></div>