Well here is a really big and maybe stupid question but please if you have time
write a few lines.
Here it goes.
I'm truing to use a freeradius to  do the following :
I  need freeradius to work with 3coms superstack 3 1500 NAS and to grant access
to  users  for  a  certain  amount of prepaid time and when that time expire to
disconnect users and if they try to connect again to deny access until they pay
for some more :)).
If you are wondering why the hell do a need such a thing, well that is how ISPs
work here in Yugoslavia.
Here is my setup: No nas at all using ntradping to emulate one.
Freeradius 0.3. Mysql database. Dialup-admin as a frontend.
Slightly modified authorize_check_query and authenticate_query
to check if session-timeout in radreply table is smaller then 0 and to deny access.
If  anyone  is  interested  in details find a mail with subject "Database design
question" in the list archive.

So wright now I need a accounting_stop_query which would update session-timeout in
radreply table when accounting stop occurs to something like this
sesion-timeout = sesion-timeout (old value) - '%{Acct-Session-Time}'
this  way  user will be able to have internet access for some prepaid amount of
time.
I tried to test it like this :


accounting_stop_query = "UPDATE ${acct_table1} SET AcctStopTime = '%S', 
AcctSessionTime =
'%{Acct-Session-Time}', AcctInputO
ctets = '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}',
AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStop
Delay = '%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId 
=
'%{Acct-Session-Id}' AND UserName = '%{SQL-
User-Name}' AND NASIPAddress = '%{NAS-IP-Address}'; UPDATE radreply SET Value
='%{Acct-Session-Time}' WHERE UserName= '%{SQL-User-Na
me}' AND Attribute = 'Session-Timeout';"


but freeradius complaints it cannot update accounting start ??

This query works in mysql console tool so its not a mistake in a sql query.
What's the right way to do this ?

Second thing that's bothering me is what will happen if an isdn user logs in.
I have  to bill isdn calls differently. If an isd user only uses one isdn channel
then he would be billed as a normal call or maybe x1.5 but when he uses both of
his channels he should be billed x2 or maybe even x3.

And   third  and  last  question is not freeradius oriented but someone on this
list  probably  knows. If a 3com superstack 3 1500 NAS receives session-timeout
attribute of 10 seconds, would it disconnect a users after 10 seconds of online
time or not.

This is the last thing that is keeping me from building an linux only isp
so if anyone can spare a couple of wise words I would appreciate it greatly.

If you have read this mail so far then thank you for your time
an  if  not then best wishes to you all and greetings from cold (-10 C ) Yugoslavia
:))


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to