how to block file bigger then 5MB from downloading?

how to block file bigger then 5MB from downloading?

how will you know the file size before it’s downloaded?

you can make a Simple Queue with burst, that will slow down the download speed after 5Mb but not block just based on size. The size is known only after it’s already transfered.

how about HTTP proxy?

proxy doesn’t know the size of files before it’s already downloaded

is it in the process of downloading or already downloaded?

how about ‘connection-bytes’ in firewall? can it help?

that will not limit file size, but will limit connection - that is why it is called connection-bytes

ok, i got it.

So, what i should do is using Simple Queue with Bursting by setting Burst time,burst threshold and burst max. but what should the value be? Example: burst max limit > max limit?

How about hotspot user? What should i do to apply the same policy?

any clues?

we actually can forward to external proxy like squid to do the filter base on reply_body_max_size directive. example: reply_body_max_size 5000000 allow all.
block_5MB.png