Web Proxy disable scripting

Hi everybody,

I am running a web proxy on lan and need a way to disable my nat redirect rule automatically if the web proxy fails. I am not quite sure how to do this but I suspect that netwatch with a script can. The web proxy has a dedicated port/subnet on my rb750 v6.11.


Thanks in advance…

With ping is not a secure method because if squid fail the proxy reply your ping packet. If you need the easy way is:

Add a netwach rule with host=ip_proxy

In the down tab add this :
/ip firewall nat disable [find comment=squid]

In the up tab add:
/ip firewall nat enable [find comment=squid]

Add the comment “squid” to you nat rule

sent from my mobile phone with tapatalk

c0d3rSh3ll

That works like a charm. Thank you.

c0d3rSh3ll you are right. What would be the other way?

Thank you…

what is your proxy OS?, I am thinking to make a script for chech the squid status and add a rule for block ping if is not running. Through this method routerOS can not ping to proxy and disable the nat rule, then if squid status is running disable this rule and routerOS can enable the nat rule again.

currently I have 2 squid servers running. One server has a windows 7 host and the other has a linux mint host. I am currently building one with debian 6.0 as a host. I only need to do this for the server with the linux mint host.

Thank you