IP>Web proxy>Allowing sites to get unblocked for certain tim

Hi All,
Can I put some time duration for unblocking websites which are blocked now.
Lets say all social networking sites are blocked for access. But I want to keep those sites available to internet users from 02:00pm to 03:00pm for access.
So please tell me that can this be done with mikrotik router?
I am using MT RB450G board with OS 5.6.

Thanks in advance.

hi
you can do this with script.
you must create script and disable site block in 02:00pm for website access to your user’s and enable site block in 03:00pm for block it.

Yes, it can be done with ROS.

How are you blocking the sites? Post your blocking rules please.

I used the same in past with mikrotik web.proxy, Here is an workaround . . .

For example you have created an rule in web.proxy to block Facebook, (BLOCK-FB rule) which blocks Face-book site , example below

/ip proxy access
add action=deny comment=fb disabled=no dst-host=www.facebook.com

(Don’t forget the ‘comments’ in rule) and Now you want to Allow access to FB from 2:00 pm till 3:00 pm,
You have to create two Scripts, one that will disable the BLOCK-FB rule,
and second that will enable the BLOCK-FB rule.

disable-fb-rule Script

/ip proxy access disable [find comment="fb"]

enable-fb-rule Script

/ip proxy access enable [find comment="fb"]

OR the cli code.

/system script
add name=disable-fb-rule policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive source=\
    "/ip proxy access disable [find comment=\"fb\"]"
add name=enable-fb-rule policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive source=\
    "/ip proxy access enable [find comment=\"fb\"]"

Now add schedule to Run “disable-fb-rule” to run at 2:00 pm Daily,
Add another schedule to Run “enable-fb-rule” to run at 3:00 pm Daily,

Code:

/system scheduler
add comment="" disabled=no interval=1d name="Disable fb rle schedule" on-event="" \
    start-date=dec/03/2010 start-time=02:00:00
add comment="" disabled=no interval=1d name="Enable fb rle schedule" on-event="" \
    start-date=dec/03/2010 start-time=03:00:00

Hope this will help, Or maybe some one else can came up with some better idea.

Thanks a ton Sir.
Today I will try to implement this script and let u know th result.
One more thing I would like to know is that
How to write the script “disable fb-rule script” in winbox without using terminal?
And if I write this in terminal then where can I see the disable/enable fb-rule script in through winbox?

Howto add scripts via WINBOX GUI
howto-add-scripts.PNG

Thanks a lot.
I have just configured the router the same way as you mentioned and showed by figure.
Now waiting for 13:00 pm to check that whether it works or not.
By the way I have added you on my hotmail list. Please accept the invite and add me too.

Please add me in your hotmail list.

Hello Syed,
I have added the script.
But if I click on run script then it is working fine, and if I wait for scheduler to perform and run the script then it is not happening.
What to do? Where I am wrong?
Thanks in advance.

You have left “on event” in scheduler. Point it to script you wanna run.