Both ISPs are PPPoE clients and have UPnP enabled, but since this is a load balancing setup, sometimes traffic is routed to ISP1, but UPnP opens up for ISP 2 and vice versa.
I'm no good at scripting, to begin with. So I found this: viewtopic.php?p=426711#p426711
Set it to schedule every minute. Works as expected with a small problem.
The script removes any existing "clones" and recreates same clones every minute. This affects online gaming/VoIP as the ports keep getting removed then replicated every minute for a second or two.
If I remove the "#if the vars above are not same, first all old clones are cleaned /ip firewall nat remove [/ip fi nat find comment="UPnP_Cloned"];" then everytime it runs, it will keep on cloning already cloned UPnP dynamic rules. I already have a separate cleanup script that runs once in 24 hours so I don't need this cleanup.
Basically, what I think is best is to make the script exit when it finds existing dynamic NAT rules are already cloned instead of cleaning/re-cloning. How would I go about doing this?
Even if we could accomplish what I need, the script runs every 1 minute (I think it's crazy to set it to run every 1 second) which is a problem for gaming/VoIP inside games.
Is there any proper solution for UPnP with load balancing setup?