[OpenSIPS-Users] SIP UAs Authentication based on a combination of username, password and IP address of the UA

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Aug 11 16:54:54 CEST 2010


Hi Sujeev,

Sujeev wrote:

[...]
> one more thing.... could you please tell me how can I add MemCache 
> support for this config.
>
> I followed this http://www.opensips.org/Resources/DocsTutMemcache
> but I stuck at "modparam("auth_db", "load_credentials", 
> "$avp(i:55)=password")" because I already used "modparam("auth_db", 
> "load_credentials", "$avp(i:56)=host_ip_address")"

Simply load both :
    modparam("auth_db", "load_credentials", "$avp(i:55)=password ; 
$avp(i:56)=host_ip_address")

And cache both the password and the IP.

Regards,
Bogdan


>
> Thank you!
>
> Sujeev
>
> On Mon, Aug 9, 2010 at 2:46 PM, Bogdan-Andrei Iancu 
> <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>
>     Hi Sujeev,
>
>     You to first do standard digest authentication of the user (using the
>     proxy_auth() function) - to also check the IP, add a new column in
>     subscriber table (to keep the IP address) and load that column (during
>     digest auth) using the load_credentials (see
>     http://www.opensips.org/html/docs/modules/1.6.x/auth_db.html#id228201).
>     <http://www.opensips.org/html/docs/modules/1.6.x/auth_db.html#id228201%29.>..
>
>     So, once the digent auth was successfully validated, you will have the
>     provisioned IP loaded into a script variable, so you can easyly
>     check it
>     against $si (source IP of the message).
>
>     Regards,
>     Bogdan
>
>     Sujeev wrote:
>     > Hi everyone,
>     > I've a small OpenSIPs setup with 1500 ATAs.  those ATAs are on a LAN
>     > and have a static IP address(Private).
>     > I want to authenticate those ATAs with a combination of username +
>     > password + IP of ATA on MySQL or Postgresql database.
>     >
>     > example;
>     > ATA 1
>     > ------
>     > IP : 10.2.222.4
>     > Username : 10001
>     > Password : 10001
>     >
>     > I added these info into a DB. When ATA 1 uses IP address
>     "10.2.222.4"
>     > ATA can register with my OpenSIPs server.
>     > When ATA 1 uses IP address 10.2.222.5 the registration should be
>     failed.
>     > Is that possible? if yes please tell me how.
>     >
>     >
>     > Thank you.
>     >
>     > Sujeev
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Users mailing list
>     > Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>
>
>     --
>     Bogdan-Andrei Iancu
>     OpenSIPS Bootcamp
>     20 - 24 September 2010, Frankfurt, Germany
>     www.voice-system.ro <http://www.voice-system.ro>
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro




More information about the Users mailing list