Comparing live sessions between NAS and freeradius
Hi Everyone, I'm using SQL for Simultaneous Use checking. It works in that if someone tries to auth when they're already logged in, they're rejected. However, sometimes the acct stop packet never makes it to freeradius (for whatever reason) when the user logs off. This leaves the "acctstoptime" field in the radacct table as NULL, which freeradius interprets as a live session. Obviously, the session doesn't actually exist on the NAS. I've read what checkrad does. From what I understand after reading the config files, checkrad only works in conjunction with radutmp. I'm not using radutmp since I've deployed freeradius with SQL. So, how do I ensure what freeradius' understands to be a live session matches what the NAS sees? How do I update a user's acctstoptime when the NAS doesn't have a session for that user, but the DB shows as "NULL" (i.e. freeradius believes the user is live)? Is this where the "deletestalesessions" parameter in sql.conf comes in? What if users are logged in for days at a time? Should lease-duration just be bumped up to something that works better for us than the "3600" default? Regards, Ranbir
sees? How do I update a user's acctstoptime when the NAS doesn't have a session for that user, but the DB shows as "NULL" (i.e. freeradius believes the user is live)?
It is called stale session. I am also trying to solve the same. I just discussed this topic few days back. Check the list archive for previous detail discussion on how to solve this.
From my understanding, there is no common solution to this because every problem is unique (based on your business logic) . You need to check the "racacct" table periodically to detect such problem (based on your implementation) and come up with your own SQL to modify this table (again based on your implementation).
Regards -- ============================== Registered Linux User #460714 Currently Using Fedora 10, CentOS 5.3 ==============================
On Tue, 2009-08-18 at 12:21 +0800, Deepak wrote:
It is called stale session. I am also trying to solve the same. I just discussed this topic few days back. Check the list archive for previous detail discussion on how to solve this.
From my understanding, there is no common solution to this because every problem is unique (based on your business logic) . You need to check the "racacct" table periodically to detect such problem (based on your implementation) and come up with your own SQL to modify this table (again based on your implementation).
Some searching last night has given me a better idea of how to solve my problem. But, I still have a question: does "lease-duration" affect stale sessions? That is, if lease-duration is "3600", any sessions longer than that will be regarded as stale by freeradius, and therefore killed? Regards, Ranbir -- Kanwar Ranbir Sandhu Linux 2.6.27.29-170.2.78.fc10.x86_64 x86_64 GNU/Linux 08:04:15 up 2 days, 9:01, 2 users, load average: 0.60, 0.51, 0.36
participants (3)
-
Deepak -
Kanwar Ranbir Sandhu -
m3freak@thesandhufamily.ca