So what I would like is to make my login page add a user to userman by binding to there mac address and give them a download and upload limit per mac address and a bandwidth limit and free wifi for say the 5 or 6 hours then after that they get logged out and all uses are removed daily and they the next day they can use free wifi again.
Currently my login.html page does this
which is just a button that says I agree to terms and they see my terms.
Login.html
Code: Select all
<a style="color: #FF8080; font-size: 15px;"
href="$(link-login-only)?dst=$(link-orig-esc)&username=T-$(mac-esc)">
<img alt="" src="img/agree.png" width="190" height="60" style="border-width: 0px" /></a></td>
Code: Select all
#Set your dowload limit in MegaBYTES!
:local downloadlimitmb "1050"
### You will not need to edit anything below this line ###
:local downloadlimit [($downloadlimitmb * 1048576)]
:local counter
:local datadown
:local username
:local macaddress
:foreach counter in=[/ip hotspot active find where user~"^[T][-].{17}"] do={
:set datadown [/ip hotspot active get $counter bytes-out]
:if ($datadown>$downloadlimit) do={
:set username [/ip hotspot active get $counter user]
:set macaddress [/ip hotspot active get $counter mac-address]
/ip hotspot user remove [/ip hotspot user find where name=$username profile=default]
/ip hotspot user add name=$username limit-bytes-out=$downloadlimit mac-address=$macaddress profile=default
/ip hotspot active remove $counter
:log info "Force logout on user: $username - Reached download quota"
Like I said this setup works great but it will not track Youtube, Netflix, Torrentz, ect....
It does track www data but that's about it.
Any help would be greatly appreciated.
Thanks
Steven