I am using OS 5.0 with freeradius & MySql with DialupAdmin interface and I want to create two user profile, the first with time limit and second with total data limit.
I can use a dictionary words?
I see rlm_sqlcounter script, anybody can help me?
Choose 2 of these for the data limits for received and sent.
Mikrotik-Recv-Limit - total receive limit in bytes for the client
Mikrotik-Recv-Limit-Gigawords - 4G (2^32) bytes of total receive limit (bits 32..63, when bits 0..31 are delivered in Mikrotik-Recv-Limit)
Mikrotik-Xmit-Limit - total transmit limit in bytes for the client
Mikrotik-Xmit-Limit-Gigawords - 4G (2^32) bytes of total transmit limit (bits 32..63, when bits 0..31 are delivered in Mikrotik-Recv-Limit)
Choose any combination of these for time limits
Idle-Timeout - overrides idle-timeout in the default configuration
Session-Timeout - overrides session-timeout in the default configuration
WISPr-Session-Terminate-Time - time, when the user should be disconnected; in “YYYY-MM-DDThh:mm:ssTZD” form, where Y - year; M - month; D - day; T - separator symbol (must be written between date and time); h - hour (in 24 hour format); m - minute; s - second; TZD - time zone in one of these forms: “+hh:mm”, “+hhmm”, “-hh:mm”, “-hhmm”
profile1: all of the client in this profile have total traffic 100MByte for 30 days, next client expired
profile2: all of the client in this profile have total connection time 1h / 30 days with data unlimited, next client expired
yes, when the client reached the total data is disconnected, but if I try to relogin, I been accepted from hotspot…
I think is necessary to define sqlcounter…only with mikrotik attribute is not possible!!
So you want it to be that after the guest logged in once with a given access code it is no longer valid?
If that is the case, that’s not a MikroTik programing issue, that’s a SQL database issue. You need to somehow program and define that after a guest has successfully used x access code that it is no longer valid. I’m not a database person or programer so I can’t be of much help with that.
I can tell you however that it is possible. With our back end system we can define codes that expire a certain time after first use. It did however take some time for our programers to figure that system out.
You will have problems with data limits > 4GB coz the counter wraps at 4GB. (32bit)
So when you have a remaining quota of 5GB, sql counter will return 1GB left.
If you find a solution to this, let me know