Hi,
Im trying to do a ipsec failover, but the command to enable/disable the ipsec policy is not working when using the scheduler or running trough winbox.
When I run using the cli is working.
Already tried to use the script from page: https://alext.mail.at/?p=620
Ive made some changes (just for testing):
:global PrimaryPolicy 3
:global SecondaryPolicy 4
:global Pingtest [:ping count=3 1.1.1.1];
:log err "--------Start----------"
{:if ($Pingtest>0) do={
:log err "start if"
/ip ipsec policy disable $SecondaryPolicy;
/ip ipsec policy enable $PrimaryPolicy;
:log err "End if"
} else={
log err "start else"
/ip ipsec policy disable $PrimaryPolicy;
/ip ipsec policy enable $SecondaryPolicy;
:log err "End else"
}
log err "-----------End------------"}
If I run from cli, I can see the start in the logs the " Start if" and "End if".
When I schedule, or try to run the script via winbox, I can see the "Start if", but nothing more. It seems that the script is haging when try to do the ipsec disable command (or enable).
Im using version 6.42.10.