Script to probe squid proxy to disable/enable nat rule

Hey Everybody,

I am in need of a script to probe port 3128 on my squid proxy and disable my dstnat rule on proxy failure. Right now I am am using ping on netwatch and a small script on up/down to enable/disable the dstnat rule. Also I am using dude to probe this port http>3128. But I need something automated.

This is my netwatch configuration
/tool netwatch
add down-script=“/ip firewall nat disable [find comment=squid]” host=
192.168.40.254 interval=5s timeout=5s up-script=
“/ip firewall nat enable [find comment=squid]”


Thanks in advance.

Use ros_command on The Dude in case of probe failure to disable / enable the rule.

I use the wccp packet for status
http://forum.mikrotik.com/t/how-to-verify-an-answering-port/36367/1

You can also use fetch command.