Huh, you got it wrong again, but at least your question was precise this time
counter
daily {
filename = ${raddbdir}/db.daily
key = User-Name
count-attribute = Acct-Session-Time
reset = daily
counter-name = Daily-Session-Time
check-name = Max-Daily-Session
allowed-servicetype = Framed-User
cache-size = 5000
}
at the end of authorize, accounting and instaantiate sections add
authorize {
...
...
...
daily
}
instantiate {
...
...
...
daily
}
accounting {
...
...
...
daily
}
in your database, in radcheck table insert this:
INSERT into radcheck VALUES ('','
username','
Max-Daily-Session','10800',':=');
Restart freeradius and of you go...
Now look at the bolded text, do you see the pattern?
your "daily" module will count Acct-Session-Time values and check those values against Max-Daily-Session. Counter will use "username" as key for counting, so he can only have one value for each user. Value is reset every day. Max-Daily-Sesion value is something module should check so it resides in radcheck table (obviously, table name is rad
check). We've inserted username and Max-Daily-Session, key and check value. Counters will be saved in db.daily file. Counter will also pay attention to type of service, in this case Framed-User. So, in case you have some other data in your database, or for example you are billing telnet sessions also, telnet session will not be affected by the counter, because of different type of service.
Your user will be allowed to be connected 10800 seconds per day in total, no matter how many times connected.
Freeradius will take care of session timeout value, not you, otherwise it wouldn't make any sense.