change remote address in IPIP

Hello,

sometimes my ipip Is blocked, so i want to chnage remote address in IPIP by scripts when 10.10.10.2 dont have ping , i try to Write it , but dont working

:if ([/ping 10.10.10.2 interval=3 count=3]<2) do={
/interface ipip set 0 remote-address=173.208.129.137
}

also i try to Solve it but result is failed

can anyone help me anymore?

It’s generally better practice to use [find] instead of a number, that way if items are added / removed and the numbers change, you don’t have to change the script.

First, add a unique comment to your ip tunnel.

Then change the script:
:if ([/ping 10.10.10.2 interval=3 count=3]<2) do={
/interface ipip set [find comment=“myTunnel”] remote-address=173.208.129.137
}

thanks for reply , i test it and working good