2 wan connection 10.10.10.5/29 gateway=10.10.10.1 (ether 1) and 10.10.10.10/29 gateway=10.10.10.9 (ether2)
2 lan network 192.168.1.1/24 (ether3) and 192.168.2.1/24 (ether4)
mangle: src addres 192.168.2.0/24 action= mark routing = to ether 2
routes= 0.0.0.0/0 gateway 10.10.10.1
0.0.0.0/0 gateway 10.10.10.9 routing mark=to router 2
until here all its fine
but when i active the proxy : NAT= chain dstnat src addres 192.168.2.0/24 protocol tcp dst port 8080 action=redirect to port 8080
and web proxy settings enable yes port 8080 all the web access work fine but network 192.168.2.0/24 goes by wan1
Once you use the proxy the src-address for the web traffic is no longer the client’s IP, but the router’s IP address since the router proxy goes out on behalf of the client and fetches the content.
Got it. But I add a new mangle: chain ‘output’ action routing mark= to ether2 and I lost internet, so i change this rule (dst-port 8080 action routing mark= to ether2 and i get internet but i check in whatismyip.com and I see the wan1. Or change in interface= network 2 and a lot of stuff that I think can need but still going wan2) any suggestion?
Can you please post your actual rules instead of describing them?
One approach is to add a bridge as a loopback device, add an IP address to it, and set the src-address of the proxy to that loopback IP. That gives an easy way to track proxy connections. Something like this: