Help with sqlippool
I need some help trying to configure sqlippool. I've followed the instruction from http://wiki.freeradius.org/Rlm_sqlippool and few other places. I did compile FR from source with the following configuration options: Options 1: ./configure --prefix=/usr/local/freeradius-server-2.1.1 --with-openssl --with-threads --with-vmps --with-modules=rlm_sqlippool Options 2: ./configure --prefix=/usr/local/freeradius-server-2.1.1 --with-openssl --with-threads --with-vmps --with-rlm_sqlippool Options 3: ./configure --prefix=/usr/local/freeradius-server-2.1.1 --with-openssl --with-threads --with-vmps --enable-rlm_sqlippool Each time my start access point running hostapd, FR crashes with the following message. Sun Oct 26 22:10:49 2008 : Info: ++[sradutmp] returns ok Sun Oct 26 22:10:49 2008 : Debug: rlm_sql (sql): Reserving sql socket id: 1 Sun Oct 26 22:10:49 2008 : Info: [sqlippool] expand: %{User-Name} -> Sun Oct 26 22:10:49 2008 : Info: [sqlippool] sql_set_user escaped user --> '' Sun Oct 26 22:10:49 2008 : Info: [sqlippool] expand: START TRANSACTION -> START TRANSACTION radiusd: symbol lookup error: /usr/local/freeradius-server-2.1.1/lib/rlm_sqlippool-2.1.1.so: undefined symbol: rlm_sql_query Below are my configuration OS: Ubuntu (Kernel 2.6.24-21) FR: 2.1.1 radiusd.conf exec_prefix = ${prefix} sysconfdir = ${prefix}/etc localstatedir = ${prefix}/var sbindir = ${exec_prefix}/sbin logdir = ${localstatedir}/log/radius raddbdir = ${sysconfdir}/raddb radacctdir = ${logdir}/radacct name = radiusd confdir = ${raddbdir} run_dir = ${localstatedir}/run/radiusd db_dir = ${raddbdir} libdir = ${exec_prefix}/lib pidfile = ${run_dir}/${name}.pid max_request_time = 30 cleanup_delay = 5 max_requests = 1024 listen { type = auth ipaddr = * port = 0 } listen { ipaddr = * port = 0 type = acct } hostname_lookups = no allow_core_dumps = no regular_expressions = yes extended_expressions= yes log { destination = files file = ${logdir}/radius.log syslog_facility = daemon stripped_names = no auth = no auth_badpass = no auth_goodpass = no } checkrad = ${sbindir}/checkrad security { max_attributes = 200 reject_delay = 1 status_server = yes } proxy_requests = yes $INCLUDE proxy.conf $INCLUDE clients.conf thread pool { start_servers = 5 max_servers = 32 min_spare_servers = 3 max_spare_servers = 10 max_requests_per_server = 0 } modules { $INCLUDE ${confdir}/modules/ $INCLUDE eap.conf $INCLUDE sql.conf $INCLUDE sql/mysql/counter.conf $INCLUDE sqlippool.conf } instantiate { exec expr daily expiration logintime } $INCLUDE policy.conf $INCLUDE sites-enabled/ sites-enabled/default authorize { preprocess chap mschap suffix eap { ok = return } unix #files sql daily expiration logintime pap } authenticate { Auth-Type PAP { pap } Auth-Type CHAP { chap } Auth-Type MS-CHAP { mschap } unix eap } preacct { preprocess acct_unique suffix #files } accounting { detail daily unix radutmp sradutmp sqlippool sql sql_log attr_filter.accounting_response } session { radutmp } post-auth { sqlippool reply_log sql sql_log exec Post-Auth-Type REJECT { attr_filter.access_reject } } pre-proxy { } post-proxy { eap } ippool.conf allocate-clear = "UPDATE ${ippool_table} \ SET nasipaddress = '', pool_key = 0, \ callingstationid = '', username = '', \ expiry_time IS NULL \ WHERE expiry_time <= NOW() - INTERVAL 1 SECOND AND nasipaddress = '%{Nas-IP-Address}'" allocate-find = "SELECT framedipaddress FROM ${ippool_table} \ WHERE pool_name = '%{control:Pool-Name}' AND expiry_time < NOW() \ ORDER BY (username <> '%{User-Name}'), \ (callingstationid <> '%{Calling-Station-Id}'), \ expiry_time \ LIMIT 1 \ FOR UPDATE" pool-check = "SELECT id FROM ${ippool_table} \ WHERE pool_name='%{control:Pool-Name}' LIMIT 1" allocate-update = "UPDATE ${ippool_table} \ SET nasipaddress = '%{NAS-IP-Address}', pool_key = '${pool-key}', \ callingstationid = '%{Calling-Station-Id}', username = '%{User-Name}', \ expiry_time = NOW() + INTERVAL ${lease-duration} SECOND \ WHERE fra
Re: How long do dynamic clients stay cached?
On Sun, 2008-10-26 at 09:06 -0700, Jason Swan wrote: > 2008/10/26 <[EMAIL PROTECTED]> > > Read raddb/sites-available/dinamic-clients. > > Neither question is answered, I want to know how long the default > lifetime is, and where this lifetime variable is set. thanks.. That's a strange thing to say. Your original questions were: > How long do dynamic clients stay cached? And is this time > configurable? ... both of which are answered perfectly in the file Ivan mentioned. Look around line 60. As to your new question, there doesn't appear to be any explicit default, so I'm guessing it's zero, meaning "cache forever". If these are not the answers you are looking for, then you need to restate your question. Regards, K. -- ~~~ Karl Auer ([EMAIL PROTECTED]) +61-2-64957160 (h) http://www.biplane.com.au/~kauer/ +61-428-957160 (mob) GPG fingerprint: DD23 0DF3 2260 3060 7FEC 5CA8 1AF6 D9E3 CFEE 6B28 signature.asc Description: This is a digitally signed message part - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: Insert billiplan code in radacct table during authenticaiton
Thanks Ivan, by extending my query in mysql it worked. Thanks Bishal On 10/26/2008, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >>Following is my radcheck table format: >> >>--+--+-+--+ >>| id | UserName | Attribute| op | Value| CrDate >> | creator | Usemac | activated | activeDate | status | >>rate | Type | BillingPlan | TimeToFinish | >>+--+--+--++--+-+-++---+-++--+--+-+--+ >>| 1272 | bishal | User-Password| == | testpass| 2006-07-28 >>18:42:58 | bishal | 0 | 0 | 2007-07-22 20:49:17 | 0 | >> 0 | | 001 |0 | >>| 1273 | Hary | User-Password | == | lamp | 2007-08-28 20:443:58 >>| bishal | 0| 0 | 2007-08-28 20:443:58 | 0 |0 | >>| 002 |0| >>= >> >>My scenario is I have two office and each office using same NAS to >>connect to internet. >> >>Office A users: Office B Users >>bishal Hary >>stephe Mic >>john test >> >>My question is if Office A support staff want to view the online users >>then he should not be able to view office B users online. In the same >>way office B staff should not be able to view Office A users online. I >>know if I use different NAs then it's possbile. is it possible by using >>same NAS with the help of mysql? >> > >This is absolutely nothing to do with freeradius. It's user management. >Your appication that handles that is suposed to do these things. >Simplest way is to extend the query: > >>>Let's not. Use sql query to view online users with billing plan: >>> >>>SELECT radacct.*,radcheck.Billingplan FROM radacct,radcheck WHERE >>>radacct.AcctStopTime IS NULL (or =0 for older schema) AND >>>radacct.UserName=radcheck.UserName AND radcheck.Attribute='Billingplan' > >add AND radcheck.BillingPlan='001' for users from officeA and '002' >for users from officeB. Your application will have to know who is the >user using it (ie. they will have to log into it). > >Ivan Kalik >Kalik Informatika ISP > >- >List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html > > - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How long do dynamic clients stay cached?
Neither question is answered, I want to know how long the default lifetime is, and where this lifetime variable is set. thanks.. 2008/10/26 <[EMAIL PROTECTED]> > Read raddb/sites-available/dinamic-clients. > > Ivan Kalik > Kalik Informatika ISP > > > Dana 26/10/2008, "jasoneswan" <[EMAIL PROTECTED]> piše: > > > > >How long do dynamic clients stay cached? And is this time configurable? > >-- > >View this message in context: > http://www.nabble.com/How-long-do-dynamic-clients-stay-cached--tp20171312p20171312.html > >Sent from the FreeRadius - User mailing list archive at Nabble.com. > > > >- > >List info/subscribe/unsubscribe? See > http://www.freeradius.org/list/users.html > > > > > > - > List info/subscribe/unsubscribe? See > http://www.freeradius.org/list/users.html > - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How long do dynamic clients stay cached?
Read raddb/sites-available/dinamic-clients. Ivan Kalik Kalik Informatika ISP Dana 26/10/2008, "jasoneswan" <[EMAIL PROTECTED]> piše: > >How long do dynamic clients stay cached? And is this time configurable? >-- >View this message in context: >http://www.nabble.com/How-long-do-dynamic-clients-stay-cached--tp20171312p20171312.html >Sent from the FreeRadius - User mailing list archive at Nabble.com. > >- >List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html > > - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: Insert billiplan code in radacct table during authenticaiton
>Following is my radcheck table format: > >--+--+-+--+ >| id | UserName | Attribute| op | Value| CrDate > | creator | Usemac | activated | activeDate | status | >rate | Type | BillingPlan | TimeToFinish | >+--+--+--++--+-+-++---+-++--+--+-+--+ >| 1272 | bishal | User-Password| == | testpass| 2006-07-28 >18:42:58 | bishal | 0 | 0 | 2007-07-22 20:49:17 | 0 | > 0 | | 001 |0 | >| 1273 | Hary | User-Password | == | lamp | 2007-08-28 20:443:58 >| bishal | 0| 0 | 2007-08-28 20:443:58 | 0 |0 | >| 002 |0| >= > >My scenario is I have two office and each office using same NAS to >connect to internet. > >Office A users: Office B Users >bishal Hary >stephe Mic >john test > >My question is if Office A support staff want to view the online users >then he should not be able to view office B users online. In the same >way office B staff should not be able to view Office A users online. I >know if I use different NAs then it's possbile. is it possible by using >same NAS with the help of mysql? > This is absolutely nothing to do with freeradius. It's user management. Your appication that handles that is suposed to do these things. Simplest way is to extend the query: >>Let's not. Use sql query to view online users with billing plan: >> >>SELECT radacct.*,radcheck.Billingplan FROM radacct,radcheck WHERE >>radacct.AcctStopTime IS NULL (or =0 for older schema) AND >>radacct.UserName=radcheck.UserName AND radcheck.Attribute='Billingplan' add AND radcheck.BillingPlan='001' for users from officeA and '002' for users from officeB. Your application will have to know who is the user using it (ie. they will have to log into it). Ivan Kalik Kalik Informatika ISP - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
How long do dynamic clients stay cached?
How long do dynamic clients stay cached? And is this time configurable? -- View this message in context: http://www.nabble.com/How-long-do-dynamic-clients-stay-cached--tp20171312p20171312.html Sent from the FreeRadius - User mailing list archive at Nabble.com. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html