Community discussions

MikroTik App
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Help to Drop Download in mikrotik 6.X or 5.x

Mon Oct 18, 2021 5:18 pm

Hi there
have a nice time
i have big big problem
i am using this rule to drop download 10 MB every 1 Hour
/ip firewall filter
add action=add-src-to-address-list address-list=Src address-list-timeout=1h \
chain=forward connection-bytes=1970000-0 disabled=no protocol=tcp \
src-address=192.168.0.0/24
add action=add-dst-to-address-list address-list=Dst address-list-timeout=1h \
chain=forward connection-bytes=1970000-0 disabled=no protocol=tcp \
src-address=192.168.0.0/24
add action=drop chain=forward disabled=no dst-address-list=Dst protocol=tcp \
src-address-list=Src
i don't understand how 197000-0 = 10 Mb
anyway
i want drop download after 200 MB every 23:59:59 (every day)
so i changed 1970000-0 to 1970000×20 = 39400000-0
not working
changed 1970000-0 to 19700000-0
not working
please help
how i can Drop Download every 200 MB
best regards
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19323
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Help to Drop Download in mikrotik 6.X or 5.x

Mon Oct 18, 2021 6:16 pm

Dont understand,
Do you mean you wish to have some sort of bandwidth management control.

a. maximum daily download limit per user?
b. maximum daily download limite per subnet?
c. Control throughput put speeds so that users can only download at reduced speeds depending upon overall bandwidth.

Schedules............

In other words, its not important the solution first, its more important to fully understand what the problem is, why are yuou doing this, and also understand what you are trying to accomplish.
your solution may not be the best approach for the problem.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Help to Drop Download in mikrotik 6.X or 5.x

Mon Oct 18, 2021 7:51 pm

connection-bytes=1970000-0
i don't understand how 197000-0 = 10 Mb
First of all is 1970000, with 4 zeros, not 3
then are bytes (as the name) and not bit.

1970000-0 is one interval, from 0 to 1970000 bytes passed inside that connection

1970000 bytes = 8 * 1970000 bits = 15760000 bit

and on the wrong idea of the creator of the rule, 15760000 bit = 15390 kbit = 15Mbit (rounded)???

is wrong because bit are not multiplied by 1024 (neither the Bytes), but 1000, only biByte go by 1024
1Mbit = 1000kbit = 1000000bit
1MByte = 1000KByte = 1000000Byte = 8000000bit
1MiB (MebiByte) = 1024KiB (KibiByte) = 1048576iB (bibyte = byte) = 8388608bit

If the value must represent 10MByte simply must be written 10000000 without spaces


And about the rules for me are really ______, because what they do is block one site from everyone, not only the IP that pass the limit,
because all the source are blocked at the same time to all the destination, regardless if before are connected or not.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19323
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Help to Drop Download in mikrotik 6.X or 5.x

Mon Oct 18, 2021 9:13 pm

Yes rextended, in summary,
the op needs to articulate what the problem is and the requirements and then a solution/config will fall out naturally.
I am not sure what convoluted config was being attempted but it looks stunningly complex and useless at the same time.
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Help to Drop Download in mikrotik 6.X or 5.x

Tue Oct 19, 2021 10:38 am

thank you for your reply
now i working with this value 1970000-0 every 1 Hour
i want change it to be 200 MB every 24 hour
what is true value?
.............................................................................................................................................
((If the value must represent 10MByte simply must be written 10000000 without spaces ))
is 10000000 × 20 = 200000000 or 200000000-0
all i want 200 MB
......................................................................................................
a. maximum daily download limit per user?
yes i want every user drop download when he reach to 200 MB
best regards
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Help to Drop Download in mikrotik 6.X or 5.x

Wed Oct 20, 2021 11:39 am

yes i want every user drop download when he reach to 200 MB everyday
is this not good idea?
/ip firewall filter
add action=add-src-to-address-list address-list=Src address-list-timeout=24h \
chain=forward connection-bytes=200000000-0 disabled=no protocol=tcp \
src-address=192.168.0.0/24
add action=add-dst-to-address-list address-list=Dst address-list-timeout=24h \
chain=forward connection-bytes=200000000-0 disabled=no protocol=tcp \
src-address=192.168.0.0/24
add action=drop chain=forward disabled=no dst-address-list=Dst protocol=tcp \
src-address-list=Src
if its good idea please check the rule
if not
what is the best way to make user disconnect when his IP reach to 200 MB every day..
i am not use hotspot
just DHCP with static ip
Best regards
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Help to Drop Download in mikrotik 6.X or 5.x

Sun Oct 24, 2021 4:44 pm

Please Help me
what's is true value in firewall filter> connection-byte to drop ip after downloading 200 MB daily
thank you
 
khaloudy
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 92
Joined: Mon Jun 29, 2009 6:12 am

Re: Help to Drop Download in mikrotik 6.X or 5.x

Mon Oct 25, 2021 4:28 pm

:( Help .. :(

Who is online

Users browsing this forum: Bing [Bot], dioeyandika, fadelliz78, ianjay06, infabo, mongobongo, mquan1984, Sailwebwifi and 92 guests