Hello people
I have my web-proxy and it works fine, it posible set a specific time? example 8AM to 5PM proxy is close.
thanks
/ip firewall nat add chain=dstnat protocol=tcp dst-port=80 time=08:00:00-17:00:00,fri,mon,sat,sun,thu,tue,wed action=accept
/ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080
Wow ok thats was im thinking lately but im want to be sure, ahhhh if you mind you can you share a sample script, thanks a lot dssmitikYou could use a NAT rule to redirect to proxy at specific times.
In your case, you could try something like this:This does not redirect traffic between 5am - 8pm, but redirects everything else all other times.Code: Select all/ip firewall nat add chain=dstnat protocol=tcp dst-port=80 time=08:00:00-17:00:00,fri,mon,sat,sun,thu,tue,wed action=accept /ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080
If you're looking to just enable/disable the web-proxy at specific times, you could schedule a script to run that enables and another to disable the web proxy via system scheduler.
Hope this helps. If you need more assistance, feel free to ask.
/system script add name="EnableWebProxy" source="/ip proxy set enabled=yes"
/system script add name="DisableWebProxy" source="/ip proxy set enabled=no"
/system scheduler add name=DisableWebProxy start-time=08:00:00 interval=1d on-event="DisableWebProxy" policy=write,read
/system scheduler add name=EnableWebProxy start-time=17:00:00 interval=1d on-event="EnableWebProxy" policy=write,read
Hello miktik thank you very much for your assitance im glad it works weheheYou could create two scripts, one to disable, and one to enable.Then you could schedule these scripts to run at specific times:Code: Select all/system script add name="EnableWebProxy" source="/ip proxy set enabled=yes" /system script add name="DisableWebProxy" source="/ip proxy set enabled=no"
This will disable the web-proxy every day at 8am, then enable it at 5pmCode: Select all/system scheduler add name=DisableWebProxy start-time=08:00:00 interval=1d on-event="DisableWebProxy" policy=write,read /system scheduler add name=EnableWebProxy start-time=17:00:00 interval=1d on-event="EnableWebProxy" policy=write,read