[ask] how to limit download, upload & browsing in separate

hi all..!
i have a question to ask, can mikrotik :

  1. limit a user for download
  2. limit a user for upload
  3. limit a user for browsing
    pliss need help…?

thx
for advanced

yes, you can add simple queue rule via script.

no i mean to limit separate, examples :

  1. ip 192.168.1.1 → get a download limit 1 giga
  2. ip 192.168.1.2 → get a upload limit 512 mb
  3. ip 192.168.1.3 → get a browsing limit 3 giga

i know that browsing, download & upload used a same port which is port 80.
but can mikrotik do this..?

better use radius server

radius server..?
i dont seems to find how radius can limit download,upload & browsing in separate way… :frowning:
i’ve tried queue tree & simple queue, but they limit all the packet that through port 80.

help…

Create mangle rule for browsing:

/ip firewall mangle
 add chain=forward src-address=192.168.1.1 out-interface=public action=passthrough

this rule will count all outgoing traffic. Now you can get total sent bytes:

# if total bytes is less than 1GByte then limit is not reached
:if ( [/ip firewall mangle get [ /ip firewall mangle find src-address=192.168.1.1 ]  bytes] < 1000000000 ) do={  
    :put "not yet reached limit" ; } else { :put "reached limit"; };

you can do the same for all other clients and for download too, just by adding more mangle rules and modifying script

thx mrz, is this for download/browsing/upload…?

hi, well dude.. you can limit download and upload apart, but browsing normaly uses port 80, so the best you can do is limit download and upload over port 80 to see what happens! Of course it will count any http download you do also but i dont know another way to do this!