This change modifies identification and removal of the acqual global NAT WAN rules for a UniFiOS environment. In fact, instead of completely flushing the whole POSTROUTING chain to get rid of NAT, this change modifies natanator.sh to just remove the actual MASQUERADE jump targets under the UBIOS_POSTROUTING_USER_HOOK chain where UniFiOS actually places the global NAT WAN rules.
In addition, this change makes also sure that user defined NAT rules will stay effective, thus just the global anywhere/anywhere NAT rules with reference to UBIOS_ADDRv4_eth8 and UBIOS_ADDRv4_eth9 will be removed. Thus, user defined NAT rules will still continue to work while only NAT WAN rules will be removed to make sure no double NAT will be effective if a dedicated router is doing the NAT and e.g. a UDMpro should only work as a plain network client and refrain from doing NAT itself.
This change modifies identification and removal of the acqual global NAT WAN rules for a UniFiOS environment. In fact, instead of completely flushing the whole POSTROUTING chain to get rid of NAT, this change modifies natanator.sh to just remove the actual MASQUERADE jump targets under the UBIOS_POSTROUTING_USER_HOOK chain where UniFiOS actually places the global NAT WAN rules. In addition, this change makes also sure that user defined NAT rules will stay effective, thus just the global anywhere/anywhere NAT rules with reference to UBIOS_ADDRv4_eth8 and UBIOS_ADDRv4_eth9 will be removed. Thus, user defined NAT rules will still continue to work while only NAT WAN rules will be removed to make sure no double NAT will be effective if a dedicated router is doing the NAT and e.g. a UDMpro should only work as a plain network client and refrain from doing NAT itself.