Hello,<br><br>If I use ::<br><br> use_blacklist("gw");<br><br> # filter out requests going to ips of my gws<br> dst_blacklist = gw:{( tcp , 192.168.1.18 , 5060 , "" ),( any ,192.168.1.30 , 0 , "" )}<br>
<br>Then I m getting the following error ::<br><br>Aug 10 11:31:42 [2812] ERROR:core:fix_actions: [UN]USE_BLACKLIST - list gw not configured<br>Aug 10 11:31:42 [2812] ERROR:core:fix_actions: fixing failed (code=-6) at cfg line 201<br>
Aug 10 11:31:42 [2812] ERROR:core:main: failed to fix configuration with err code -6<br><br><br>Can u please help me for the IP Black listing issue.<br><br><br>Thanks a lot in advance.<br><br>-Urmi<br><br><div class="gmail_quote">
---------- Forwarded message ----------<br>From: <b class="gmail_sendername">urmi lakkad</b> <span dir="ltr"><<a href="mailto:urmi.lakkad@gmail.com">urmi.lakkad@gmail.com</a>></span><br>Date: Fri, Aug 7, 2009 at 3:10 PM<br>
Subject: opensips + IP Blacklist Issue<br>To: <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br><br><br>
        
        
        
        
<p style="margin-bottom: 0in;">Hello,</p>
<p style="margin-bottom: 0in;">
</p>
<p style="margin-bottom: 0in;">I am using opensips-1.5.1. And I m
doing IP-black listing.</p>
<p style="margin-bottom: 0in;">
</p>
<p style="margin-bottom: 0in;">I want to block calls from particular
IP(i.e 192.168.10). When I m doing that, the calls are not blocked,
its still working fine. Any suggestions on this ?? Below is my
opensips.cfg.</p>
<p style="margin-bottom: 0in;">----------------------------------------------------------------------------</p>
<p style="margin-bottom: 0in;">
</p>
<p style="margin-bottom: 0in;">loadmodule "userblacklist.so"<br>modparam("userblacklist",
"db_url","mysql://<a href="http://opensips:opensipsrw@127.0.0.1/opensips" target="_blank">opensips:opensipsrw@127.0.0.1/opensips</a>")<br>modparam("userblacklist",
"db_table", "userblacklist")<br>modparam("userblacklist",
"use_domain", 1) #non-zero value for domain support<br><br>
</p>
<p style="margin-bottom: 0in;">route[2]<br>{</p>
<p style="margin-bottom: 0in;"> $avp(i:80) = $rU;</p>
<p style="margin-bottom: 0in;"># $avp(i:80) =
$rU=~"192.168.1.10";</p>
<p style="margin-bottom: 0in;"># $avp(i:80) =
$rU=~"sip:1[0-9][0-9][0-9][1]@.*";</p>
<p style="margin-bottom: 0in;"># # rewrite the R-URI</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;"> xlog("L_INFO","
Be4 check user blacklist, --------------------------------------\n");</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;"> if
(!check_user_blacklist("$avp(i:80)", "$avp(i:82)"))</p>
<p style="margin-bottom: 0in;"> {</p>
<p style="margin-bottom: 0in;"> xlog("L_INFO","
inside check user blacklist,
--------------------------------------\n");</p>
<p style="margin-bottom: 0in;"> sl_send_reply("403",
"Forbidden");</p>
<p style="margin-bottom: 0in;"> exit;</p>
<p style="margin-bottom: 0in;"> }</p>
<p style="margin-bottom: 0in;">}</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;">----------------------------------------------------------------------------<br>Table userblacklist entry</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;"><b>ID        Username        Domain                prefix                whitelist</b></p>
<p style="margin-bottom: 0in;">1        10001                192.168.1.10                10001                0</p>
<p style="margin-bottom: 0in;">2        10002                192.168.1.10                10001                0</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p style="margin-bottom: 0in;">Thanks for your attention.</p>
<p style="margin-bottom: 0in;">
</p>
<p style="margin-bottom: 0in;">-Urmi</p><font color="#888888">
<p style="margin-bottom: 0in;"><br>
</p>
</font></div><br>