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

Time based download blocking

Is there a way I can sent time base blocking to my "Download Blocking" rule.

I currently block downloads larger than X bytes.  This works fine.  I would like to set it to only be active from 8 - 4pm EST.

Any advice?

0 Kudos
4 Replies
asabban
Level 17

Time based download blocking

Hello,

you can add the properties DateTime.Time.Hour and DateTime.Time.Minute do do this. They contain the hour and the minute of the current time. You can use this to say something like

You can add a criteria to your rule that makes the rule only active when

DateTime.Time.Hour > 8 and DateTime.Time.Hour < 17.

Doing so the rule should only match from 8:00 to 16:59 (note that this is 24h time format).

I have honestly not tried that, but I think it should work this way. Do you want to give this a try?

Best,

Andre

0 Kudos
jont717
Level 12

Time based download blocking

This does not seem to work.  Still blocks all the time.

time.png

0 Kudos
schecka
Level 9

Time based download blocking

That looks like a logic problem. Was your client IP 172.16.122.4 in this test?

basically you ar saying if client ip is 172.16.122.4 then apply this, or if client ip is 172.16.122.9 and time is between 12 and 13 then apply this.

if you put parentheses around the two client Ip statements, you should get "if (one of these IPs) and (between 12 and 13) then do.. "

cheers

sven

0 Kudos
jont717
Level 12

Time based download blocking

Good catch.  If I wasn't rushing I probably would have caught that.

Issue resolved.

0 Kudos