Community discussions

MikroTik App
 
User avatar
larmaid
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue Aug 30, 2005 3:06 pm

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

Wed Jul 11, 2007 7:54 am

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
Last edited by larmaid on Thu Jul 12, 2007 4:27 am, edited 1 time in total.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 6044
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: [ask] how to limit download, upload & browsing using script.

Wed Jul 11, 2007 8:19 am

yes, you can add simple queue rule via script.
 
User avatar
larmaid
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue Aug 30, 2005 3:06 pm

Re: [ask] how to limit download, upload & browsing using script.

Wed Jul 11, 2007 1:45 pm

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..?
 
User avatar
maroon
Member Candidate
Member Candidate
Posts: 233
Joined: Thu Oct 07, 2004 11:15 am
Location: Lebanon
Contact:

Re: [ask] how to limit download, upload & browsing using script.

Wed Jul 11, 2007 4:50 pm

better use radius server
 
User avatar
larmaid
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue Aug 30, 2005 3:06 pm

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

Thu Jul 12, 2007 4:26 am

radius server..?
i dont seems to find how radius can limit download,upload & browsing in separate way... :(
i've tried queue tree & simple queue, but they limit all the packet that through port 80.
 
User avatar
larmaid
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue Aug 30, 2005 3:06 pm

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

Thu Jul 12, 2007 12:12 pm

help....
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 6044
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

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

Thu Jul 12, 2007 3:12 pm

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
 
User avatar
larmaid
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue Aug 30, 2005 3:06 pm

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

Fri Jul 13, 2007 4:06 am

thx mrz, is this for download/browsing/upload....?
 
nitrium
Frequent Visitor
Frequent Visitor
Posts: 94
Joined: Wed Apr 04, 2007 9:00 pm

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

Thu Oct 18, 2007 2:17 pm

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!

Who is online

Users browsing this forum: No registered users and 21 guests