Community discussions

MikroTik App
 
anassar26
just joined
Topic Author
Posts: 20
Joined: Sun Aug 02, 2020 3:20 pm

help me please .. how to limit users according to amount of download

Sun May 08, 2022 12:51 am

how can i limit users according to amount of download by using simple queue script ?
i have 4 users some of them download a lot and I want to limit them after they reach 4 gigabyte per day
I did simple queue for each one of them to limit upload and download rate speed
I want limit users according to amount of download
I use dhcp server in my network
I try script below and nothing happened
can anyone help me and explain steps
/queue simple {
    :for i from=1 to= 254 do={
        :local queue [find target=("10.10.10." . $i . "/32")]
        :if ([:len $queue] != 0) do={
            :local traf [get $queue total-bytes]
            :put ("Queue (" . [get $queue target] . ") traf: " . $traf)
            :if ($traf > 10) do={
            set [find target-addresses=("10.0.0." . $i)] max-limit= 32000/256000
            
            }
        }
    }
}

You do not have the required permissions to view the files attached to this post.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5405
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: help me please .. how to limit users according to amount of download

Sun May 08, 2022 9:29 am

Have you disabled FastTrack?
Otherwise queues will not work.
 
kevinds
Long time Member
Long time Member
Posts: 638
Joined: Wed Jan 14, 2015 8:41 am

Re: help me please .. how to limit users according to amount of download

Sun May 15, 2022 9:31 pm

Not directly related to your issue but something I noticed..
:for i from=1 to= 254 do={
What is the IP of your router? Is it in the 10.10.10.0/24 network? Or Is your network a /23 or larger? You likely don't want your router's IP in the script's range.

Second thing I see is that if users have admin privileges it is usually easy to change the MAC address, it is built into Android and iOS these days that they can disconnect and re-connect, depending on the settings of the saved SSID it will use a new random MAC.
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 2990
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: help me please .. how to limit users according to amount of download

Mon May 16, 2022 12:42 am

maybe this can be useful to you

viewtopic.php?t=185910

Who is online

Users browsing this forum: No registered users and 13 guests