Hello.
I have managed to get a successful freeradius installation and integrated it with mikrotik's hotspot service backed up with MySQL for storing accounts and passwords.
With these simple values in the radcheck table, a user can connect (Gets assigned a dynamic IP address) and stay online for an infinite amount of time:
RADCHECK:
+----+----------+-----------------+----+------------+
| id | UserName | Attribute | op | Value |
+----+----------+-----------------+----+------------+
| 1 | user | Password | == | mypass3 |
+----+----------+-----------------+----+------------+
What I would like is to limit a user's access based on session time, i.e.
User logs in, has 2 hours of online time to use. Then once the user reaches the 2 hour limit he gets logged off from the hotspot service and cant log in back again.
I followed these steps located here: http://wiki.freeradius.org/Rlm_sqlcounter
and added a new entry to the Radcheck table:
+----+----------+-----------------+----+------------+
| id | UserName | Attribute | op | Value |
+----+----------+-----------------+----+------------+
| 1 | user | Password | == | mypass3 |
| 2 | user | Max-All-Session | := | 120 | #120 seconds for testing purposes
+----+----------+-----------------+----+------------+
Unfortunately this has no effect.
I am wondering if someone could give me some tips on what kind of attributes need to be passed to the freeradius table entries in order to get it working.
The subject is quite broad and I am having a hard time reaching my goal. Not knowing freeradius and mikrotik much does not help me neither.
I would appreciate any help. Thank you!