Source-NAT LAN traffic to WAN IP
I have a problem in my home network and I can't figure out how to approach it.
My LAN interface is a bridge of several physical interfaces. For some traffic that locally goes through that bridge I need to do SNAT, so that the packet comes to the destination as if it was sent from WAN IP. In other words, translate from LANIP1->LANIP2 to WANIP->LANIP2 (and vice versa). The goal is to make a certain service communicate with the clients using the same IP address, no matter whether the client is currently accessing it from LAN or from WAN.
I've tried adding an Outbound NAT rule. Rewriting works, but the resulting packets start leaving through WAN interface, and I couldn't figure out why and how to fix that.
I'm stuck, any ideas are appreciated.
If you translate the source IP in packets to the WAN IP, responses from the destination device are sent back to WAN IP. That's evident.
You may try to activate NAT reflection + proxy in the port forwarding rule on WAN to achieve your goal.