Hi All,
I need a script which gets the out-interface in a Firewall NAT rule into the CurrentOutInterface and then compare it with the CorrectOutInterface.
When the Interfaces doesn't match the out-interface in the NAT rule must be updated with the correct one.
The issue that I have is on the second line... can't get the out-interface value into the variable CurrentOutInterface.
:local CorrectOutInterface "<l2tp-Equispirit.Horses>";
:local CurrentOutInterface [/ip firewall nat get [find where comment="Scripted - Mask VPN data / L2TP Equi Interface will be added by Script !!!"]] out-interface];
:if ($CurrentOutInterface != $CorrectOutInterface) do={
/ip firewall nat set [find where comment="Scripted - Mask VPN data / L2TP Equi Interface will be added by Script !!!" ] out-interface=<l2tp-Equispirit.Horses>
***
Can somebody help to fix this issue.
Thanks P.