Is it possible using NAT only on specific condition

Now my DIR-860L B1 running OpenWRT is configured as WiFi AP at address 192.168.1.2, and the 2 WiFis configured at 172.16.2.0/24 and 172.16.3.0/24, no nat involved, and the router configured with a static route for the data get back to WiFi clients.

While I intended for WiFi client to access a server in the LAN 192.168.1.0/24, it will get into asymmetrical routing, the request went direct to the server, while the response from the server will go through the router.

My idea is to using NAT for WiFi client only when visiting servers in the LAN 192.168.1.0/24 range. How can I configure my WiFi AP to achieve that purpose?

I've tried writing rule in /etc/firewall.user but no clue how, or even it's possible to do it there. Also I am not sure if it is possible, and how to do that.

Any ideas? Helps?

2 Likes