[OpenSIPS-Users] opensips + IP Blacklist Issue

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Aug 12 16:52:33 CEST 2009


Hi Urmi,

The useblacklist("gw") is for inbound blackists (and not for outbound) - 
this may be used for preventing opensips to sent requests (based on DNS 
resolver) to some restricted IPs.

about the error...looks strange as the syntax is ok (both definition and 
invocation) - what version of opensips are you using ?

Regards,
Bogdan

urmi lakkad wrote:
> Hello,
>
> If I use ::
>
>         use_blacklist("gw");
>
>         # filter out requests going to ips of my gws
>         dst_blacklist = gw:{( tcp , 192.168.1.18 , 5060 , "" ),( any 
> ,192.168.1.30 , 0 , "" )}
>
> Then I m getting the following error ::
>
> Aug 10 11:31:42 [2812] ERROR:core:fix_actions: [UN]USE_BLACKLIST - 
> list gw not configured
> Aug 10 11:31:42 [2812] ERROR:core:fix_actions: fixing failed (code=-6) 
> at cfg line 201
> Aug 10 11:31:42 [2812] ERROR:core:main: failed to fix configuration 
> with err code -6
>
>
> Can u please help me for the IP Black listing issue.
>
>
> Thanks a lot in advance.
>
> -Urmi
>
> ---------- Forwarded message ----------
> From: *urmi lakkad* <urmi.lakkad at gmail.com <mailto:urmi.lakkad at gmail.com>>
> Date: Fri, Aug 7, 2009 at 3:10 PM
> Subject: opensips + IP Blacklist Issue
> To: users at lists.opensips.org <mailto:users at lists.opensips.org>
>
>
> Hello,
>
> I am using opensips-1.5.1. And I m doing IP-black listing.
>
> 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.
>
> ----------------------------------------------------------------------------
>
> loadmodule "userblacklist.so"
> modparam("userblacklist", 
> "db_url","mysql://opensips:opensipsrw@127.0.0.1/opensips 
> <http://opensips:opensipsrw@127.0.0.1/opensips>")
> modparam("userblacklist", "db_table", "userblacklist")
> modparam("userblacklist", "use_domain", 1) #non-zero value for domain 
> support
>
> route[2]
> {
>
> $avp(i:80) = $rU;
>
> # $avp(i:80) = $rU=~"192.168.1.10";
>
> # $avp(i:80) = $rU=~"sip:1[0-9][0-9][0-9][1]@.*";
>
> # # rewrite the R-URI
>
>
> xlog("L_INFO"," Be4 check user blacklist, 
> --------------------------------------\n");
>
>
> if (!check_user_blacklist("$avp(i:80)", "$avp(i:82)"))
>
> {
>
> xlog("L_INFO"," inside check user blacklist, 
> --------------------------------------\n");
>
> sl_send_reply("403", "Forbidden");
>
> exit;
>
> }
>
> }
>
>
> ----------------------------------------------------------------------------
> Table userblacklist entry
>
>
> *ID Username Domain prefix whitelist*
>
> 1 10001 192.168.1.10 10001 0
>
> 2 10002 192.168.1.10 10001 0
>
>
>
> Thanks for your attention.
>
> -Urmi
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list