Community discussions

MUM Europe 2020
 
bigguns
Member Candidate
Member Candidate
Topic Author
Posts: 238
Joined: Thu Apr 01, 2010 9:03 am

Is it possible to block access to certain IP at times?

Mon May 10, 2010 8:21 pm

Hi there,

I'm looking to input a simple policy which will block web traffic at on certain days and time of the week. Is there any easy way to do this?
 
fewi
Forum Guru
Forum Guru
Posts: 7734
Joined: Tue Aug 11, 2009 3:19 am

Re: Is it possible to block access to certain IP at times?

Mon May 10, 2010 8:31 pm

Firewall filter rules can trigger on time conditions:
time (time-time,sat | fri | thu | wed | tue | mon | sun; Default: ) Allows to create filter based on the packets' arrival time and date or, for locally generated packets, departure time and date
http://wiki.mikrotik.com/wiki/Manual:IP/Firewall/Filter
 
bigguns
Member Candidate
Member Candidate
Topic Author
Posts: 238
Joined: Thu Apr 01, 2010 9:03 am

Re: Is it possible to block access to certain IP at times?

Wed May 12, 2010 8:02 pm

Hi I've trying to create the rule but its not accepting it for some reason (using 4.9)
can you write out a rule showing a block from 12pm to 5am - so I can see if I'm doing it right please.
 
fewi
Forum Guru
Forum Guru
Posts: 7734
Joined: Tue Aug 11, 2009 3:19 am

Re: Is it possible to block access to certain IP at times?

Wed May 12, 2010 8:09 pm

Drop traffic to tcp/80 between midnight and 5am on all days of the week:
/ip firewall filter
add chain=forward protocol=tcp dst-port=80 time=0s-5h,sun,mon,tue,wed,thu,fri,sat action=drop
 
bigguns
Member Candidate
Member Candidate
Topic Author
Posts: 238
Joined: Thu Apr 01, 2010 9:03 am

Re: Is it possible to block access to certain IP at times?

Thu May 13, 2010 9:21 am

Ah thats what I done wrong! The time setting I didn't put it in the right format.

Thank you.
+1 Karma

Who is online

Users browsing this forum: No registered users and 25 guests