Small manual:
Install - click system->scripts, click "+", enter in the name whatevery you want (like signallimiter), click ok, done!
You must have sheduler if you don't want to manually run the rule. Just make new system->shedule rule and put the name of the script you already defined (signallimiter or whatver name you defined) and choose time. I defined to be every 5 minutes.
How it works:
The settings "minthreshold" is minimum signal and "maxthreashold" is maximum signal that will get blocked.
This means if minthreshold is 75 and maxthreshold is 90, the clients with signals between -70 and -90 will get blocked.
If you put maxthreshold to 95 or more, the new conected/idle clients will get banned for no reason!
Settings "removeadded" if 1 will remove the clients with bad signal from access lists and try to see if their signal got better, and if 0 the clients stay there permanently.
Settings "aldisabled" if "yes" will add the clients to access-list disabled (this is for testing), and if "no" they will be enabled.
Code: Select all
:log info "Signal limiting..."
:local minthreshold 75
:local maxthreshold 90
:local removeadded 1
:local aldisabled "no"
:if ($removeadded=1) do={
:log info "Removing from wifi access-list"
:foreach i in=[/interface wireless access-list find comment="badsignal"] do={ /interface wireless access-list remove $i }
}
:local cntr 0
:log info "Adding to wifi access-list"
:foreach i in=[/interface wireless registration-table find] do = {
:local csig [/interface wireless registration-table get $i signal-strength]
:local cmac [/interface wireless registration-table get $i mac-address]
:local cint [/interface wireless registration-table get $i interface]
:local csigform [:pick $csig 1 3]
:if ($csigform<$maxthreshold && $csigform>$minthreshold) do={
/interface wireless access-list add mac-address=$cmac interface=$cint disabled=$aldisabled authentication="no" comment="badsignal"
:set cntr ($cntr+1)
}
}
Code: Select all
/ system scheduler add name="do_siglimit" on-event=siglimit start-date=jan/01/1970 start-time=00:00:00 interval=5m comment="signal limiter" disabled=no