Community discussions

MikroTik App
 
auwudia
newbie
Topic Author
Posts: 35
Joined: Tue Apr 24, 2007 4:06 pm

SCRIPT TO DISABLE WEB PROXY

Thu Jul 14, 2011 1:19 pm

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
 
andrescamino
Member Candidate
Member Candidate
Posts: 198
Joined: Wed Aug 19, 2009 7:07 pm
Location: Guayaquil-Ecuador

Re: SCRIPT TO DISABLE WEB PROXY

Fri Jul 15, 2011 1:37 am

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?

Who is online

Users browsing this forum: No registered users and 11 guests