In passthrough mode on a RUT241, I am modifying the default SNAT rules (so the device connected to the LAN port can present a different source IP than the one carried by the LTE access…but can still communicate with the RMS).
Below are the commands I put in rc.local and firewall.user (I am flushing and recreating the postrouting_rules) :
iptables -t nat -F postrouting_rule
iptables -t nat -A postrouting_rule -s <WAN_ADDRESS_LOCAL> -o wwan0 -j SNAT --to-source <WAN_ADDRESS_REMOTE>
iptables -t nat -A postrouting_rule -s <LAN_ADDRESS> -o wwan0 -j SNAT --to-source <WAN_ADDRESS_REMOTE>
iptables -t nat -A postrouting_rule -o wwan0 -m comment --comment “Bridge mode” -j ACCEPT
But randomly after a certain amount of time, default SNAT rule is coming back.
Is there an another “cleaner” way to do that so the parameter remains?