> Hi all
>
> I'm looking to implement a prepaid card type service - I plan on using
> Session-Timeout to disconnect the users. How does freeradius keep
> track of the time elapsed while connected? I am holding all the info
> in SQL - I guess when a user connects it counts down until 0 then
> sends the signal to the NAS to disconnect - if the user reconnects it
> is back to the original value.

Radius doesn't send a message to the NAS to disconnect.  The reply of
Session-Timeout tells the NAS when to disconnect.  Its up to the NAS to
listen to that reply and actually disconnect the user (most do).

> How can I have a counter that doesn't expire - say the user 'topped
> up' by 30 days worth on the 9th of the month - it wouldn't expire
> until 30 days from then (so couldn't use  monthly counters?)
>

You want to give the user 30 days of access, then do something like this
in sqlcounter

sqlcounter blockoftime {
        counter-name = Block-Of-Time
        check-name = Session-End-Time
        sqlmod-inst = sql
        key = User-Name
        reset = never
        query = "select UNIX_TIMESTAMP();"
}

then set the session-end-time in their reply attribute to be 30 days after
the time they set up the account.  Remember its in unix timestamp format.



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

Reply via email to