I have RB1100AHx4 v644.3 with pcc load balancing.
Both ISP gives dynamic IP so i need to change mangle rules and routes everytime. I’ve tried creating a script for this but i think my luck has run out.
Can’t figure out why it doesn’t work.
Anyone care to help?
:log info "checking gateway and address";
:if ($newgwIP != $routeIP) do={
:put "gateway ip $routeIP changed to $newgwIP";
}
:if ($newgwIP != $routeIP1) do={
:put "gateway ip $routeIP1 changed to $newgwIP";
}
:for i from=( [:len $newIP] - 1) to=0 do={
:if ( [:pick $newIP $i] = "/") do={
:set newIP [:pick $newIP 0 $i]
}
}
:if ($newIP != $fwIP) do={
:set fwIP $newIP
:log info "done changing fw dst address and route gateway";
I already set the variables in terminal and they are working but not changing any