<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>i configure rules for routing banned ip and i want to see where i can autdit this issues.. i mean where i can automatically define a cron setup that grep those logs definitios.. where are loggin those all?<br><br>my rules are:<br><br></div>define at begining of kamailio.cfg "#!WITH_ANTIFLOOD", later add:<br><br>#!ifdef WITH_ANTIFLOOD<br>loadmodule "htable.so"<br>loadmodule "pike.so"<br><br>modparam("pike", "sampling_time_unit", 2)<br>modparam("pike", "reqs_density_per_unit", 16)<br>modparam("pike", "remove_latency", 4)<br>modparam("htable", "htable", "ipban=>size=8;autoexpire=300;")<br>#!endif<br><br></div><div>later routing definitions:<br><br>route[REQINIT] {<br>   if(src_ip!=myself) {<br>        if($sht(ipban=>$si)!=$null) {<br>            xdbg("request from blocked IP - $rm from $fu (IP:$si:$sp)\n");<br>            exit;<br>        }<br>        if (!pike_check_req()) {<br>            xlog("L_ALERT","ALERT: pike blocking $rm from $fu (IP:$si:$sp)\n");<br>            $sht(ipban=>$si) = 1;<br>            exit;<br>        }<br>    }<br>    if($ua =~ "friendly-scanner|sipcli|VaxSIPUserAgent") {<br>            xlog("L_ALERT","ALERT: friendly canings from $fu (IP:$si:$sp)\n");<br>        exit;<br>    }<br>    if (!mf_process_maxfwd_header("10")) {<br>        sl_send_reply("483","Too Many Hops");<br>        exit;<br>    }<br>    if(is_method("OPTIONS") && uri==myself && $rU==$null) {<br>        sl_send_reply("200","Keepalive");<br>        exit;<br>    }<br>    if(!sanity_check("1511", "7")) {<br>        xlog("Malformed SIP message from $si:$sp\n");<br>        exit;<br>    }<br>}<br></div><div dir="ltr"><div><br clear="all"><div><div><div dir="ltr" class="gmail_signature"><font color="#888888">Lenz McKAY Gerardo (PICCORO)</font><div><font color="#888888"><a href="http://qgqlochekone.blogspot.com" target="_blank">http://qgqlochekone.blogspot.com</a></font></div></div></div></div></div></div></div></div></div></div>