Page 1 of 1
Hotspot Scripts - control by Scripts
Posted: Tue Jan 05, 2010 2:08 pm
by JimHeck
Hi,
Every time someone logs in to my hotspot, I generate a Simple Queue for each user, using a script called in User Profile/Scripts. These queues appear in the Queue list as 'Dynamic', ie with a D in the left hand column in WinBox. All the paramaters are greyed out, so I cannot change them mannually, or, it seems, with another script.
I wish to alter some of the paramaters (to throttle really heavy users) but find I cannot alter these queues by using another script. Is they a way of altering some of the parameters in a dynamically generated script?
thanks and rgds
Jim
Re: Hotspot Scripts - control by Scripts
Posted: Tue Jan 05, 2010 4:35 pm
by omega-00
Hey Mate,
The default queue applied to users shouldn't be determined by a script but instead a value on either
a) a server profile
b) a user profile
c) the specific user account (if you're creating accounts on the mikrotik itself).
normally I do this under the user profile, eg:
0 * name="default" idle-timeout=none keepalive-timeout=30s status-autorefresh=10m shared-users=1 rate-limit="500k/20000k" transparent-proxy=no
Re: Hotspot Scripts - control by Scripts
Posted: Tue Jan 05, 2010 5:17 pm
by JimHeck
OOppss,
Apols. Thats how I am doing it (I used to do it via calling a script, but forgot that I changed to using the settings in default user profile.
But the question still remains. I dont seem to be able to alter the queue parametrs for individual user once its set up!
rgds Jim
Re: Hotspot Scripts - control by Scripts
Posted: Tue Jan 05, 2010 5:32 pm
by fewi
Yes, you cannot change parameters of dynamically created items.
Edit: well, if you use RADIUS and the queues are dynamically created from that you can use RADIUS CoA to change the simple queue parameters. See the RADIUS section of the Wiki for details.
Re: Hotspot Scripts - control by Scripts
Posted: Fri Jan 08, 2010 1:17 pm
by JimHeck
fewi,
Yes, I am using an external radius (not MT User Manager), but I dont know about CoAs (never come across them). I'd be very grateful if you would point me to the relevant section of the WiKi - I could see anything when I searched. And maybe give me some idea of how I can check that they are arriving at the MT Box OK
rgds Jim
Re: Hotspot Scripts - control by Scripts
Posted: Fri Jan 08, 2010 6:25 pm
by fewi
Re: Hotspot Scripts - control by Scripts
Posted: Sat Jan 09, 2010 9:46 am
by JimHeck
fewi,
Many thanks. I have now configured my Radius to include an extra attribute "Mikrotic_Rate_Limit" and below I have pasted the output of the Radius (taken from the radius log) in response to an auth request (I've changed the IPs and Username).
The MT box doesnt seem to respond (alothough it logs the user on OK). I am expecting it to insert a new queue. Do I need to do anything to the MT box configuration?
rgds Jim
Client address [nnn.nnn.nnn.nnn]
NAS address [nnn.nnn.nnn.nnn]
UniqueID=5
Realm = def
User = JoGodfrey
Code = Access request
ID = 233
Length = 214
Authenticator = 0x71E0ECE3D683D92F09E745B028B8BAA1
NAS-Port-Type = Wireless-IEEE-802.11
Calling-Station-Id = 00:1E:68:81:09:39
Called-Station-Id = hs-ether5-local
NAS-Port-ID = "ether5-local"
User-Name = user-name
NAS-Port = -2142236650
Acct-Session-Id = "80501016"
Framed-IP-Address = xxx.xxx.xxx.xxx
<Unknown VSA (14988)> = 0x0A06C0A80E08
CHAP-Challenge = 0x2193A6ACDCD4DED1BE1F91B8287ED933
CHAP-Password = 0xDEC834F53DE67139C3C3B1BCE65E17B57C
Service-Type = Login
<Unknown VSA (14122)> = 0x031C687474703A2F2F3139322E3136382E31342E312F6C6F676F7574
NAS-Identifier = MikroTik
NAS-IP-Address = nnn.nnn.nnn.nnn
Client address [nnn.nnn.nnn.nnn]
NAS address [nnn.nnn.nnn.nnn]
UniqueID=6
Realm = def
User = user-name
Code = Access accept
ID = 233
Length = 0
Authenticator = 0x71E0ECE3D683D92F09E745B028B8BAA1
Mikrotik_Rate_Limit = 1M/1M
Class = def