Page 1 of 1

SCRIPT TO DISABLE WEB PROXY

Posted: Thu Jul 14, 2011 1:19 pm
by auwudia
Dear All,
I have web proxy working very well at a customer's site; they are able to block any website. However, they are now requesting that block websites such as facebook should be opened to all staff from 4pm. Can anyone kindly help me with a script or anything that can automatically make these websites available from their requested time?

I will appreciate.

Regards,

Austin

Re: SCRIPT TO DISABLE WEB PROXY

Posted: Fri Jul 15, 2011 1:37 am
by andrescamino
Hi Austin,

If everything you need to do is to disable the proxy you must have a redirect rule in your firewall to make it transparent, and another masquerade rule to masquerade everything else that is not port 80...assuming that those rules are number 0 (redirect) and 1 (masquerade), you will need this script

For example this script would be: Disableproxy
/ip proxy set enabled=no 
/ip firewall nat disable 0
Another script for enabling proxy: Enableproxy
/ip proxy set enabled=yes 
/ip firewall nat enable 0
Then you will need 2 schedulers to run Disableproxy at 4 pm and Enableproxy at 9 am with interval 1day.

Is that what you want?