cancel
Showing results for 
Search instead for 
Did you mean: 
smalldog
Level 12

Block size file

Jump to solution

Hi All, I want to block download file if size file > 20MB. How to configure rules for this? Thanks!

0 Kudos
1 Solution

Accepted Solutions
jont717
Level 12

Re: Block size file

Jump to solution

Here is what we use and it works perfect.  This is for 200MB.

6.png

0 Kudos
22 Replies
asabban
Level 17

Re: Block size file

Jump to solution

Hi Smalldog,

you can use the Body.Size property to do so. There are some threads in the Community about that. Example:

https://community.mcafee.com/message/143681#143681

You can also search for Body.Size to find different threads.

Best,

Andre

0 Kudos
smalldog
Level 12

Re: Block size file

Jump to solution

Thanks Andre, i import rules and config the rule to block >2MB and select request, response, embedded but rules seem didn't work. Can i miss some steps?

0 Kudos
asabban
Level 17

Re: Block size file

Jump to solution

Hello,

thats hard to say - are you able to provide some screenshots of your Rule configuration maybe to allow us to understand how it looks?

Thanks,

Andre

0 Kudos
smalldog
Level 12

Re: Block size file

Jump to solution

Now it work but  can not access any websites with that rules. See attach, thanks!

0 Kudos
asabban
Level 17

Re: Block size file

Jump to solution

Hello,

I think that "2048" may not reflect 2 MB but 2 KB. I would recommend to increase the value and see if that helps.

Best,

Andre

0 Kudos
smalldog
Level 12

Re: Block size file

Jump to solution

Hi Andre, i think this rule check size for entire websites not for one file. when i access a web page that contain link to download files >2MB, the pages block. Maybe need more time to test. Thanks!

0 Kudos
jont717
Level 12

Re: Block size file

Jump to solution

Here is what we use and it works perfect.  This is for 200MB.

6.png

0 Kudos
McAfee Employee

Re: Block size file

Jump to solution

One thing to keep in mind, the body.size property is generated by the Web Gateway once the file has been downloaded. So the Web Gateway has to have the entire file before it blocks it (which might defeat the purpose of your rule, which is to save bandwidth I'm guessing).

See attached ruleset which will block based on what the server says the size of the file is (Content-Length):

filesize.png

This does not take into account partial downloads, or chunked data, but will work for most downloads.

~Jon

0 Kudos
McAfee Employee

Re: Block size file

Jump to solution

To clarify, mine is the same as Jont's second rule, but hopfully the clarification about the properties helps understanding the use.

0 Kudos