I need some help with a script:
I want to put all Dynamic NAT rules in a variable for comparison. I need to execute the below script, in case Dynamic NAT entries have changes.
It is about this: http://wiki.mikrotik.com/wiki/UPnP_Multi-WAN
ros code
foreach i in=([/ip fi nat find dynamic]) do={/ip fi nat add chain=dstnat dst-address="<WAN2 IP>" \ protocol=[/ip fi nat get $i protocol] \ to-addresses=[/ip fi nat get $i to-addresses] \ to-ports=[/ip fi nat get $i to-ports] \ action=dst-nat dst-port=[/ip fi nat get $i dst-port] \ comment="UPnP_Cloned"}Thank you.
Regards.