Hello, Mikhail a écrit :
Everything works fine if I use IP1 address but I was unable to get to the corresponding LAN machine through IP2. Ping requests are also not responded if they're made to IP2. They do reach eth2 and I can see them using tcpdump but then nothing goes out on any NIC. The same goes for TCP/IP requests - I've managed to trace them to the nat table PREROUTING chain but they could not be found in either INPUT or FORWARD chain of the mangle table. If I make default route through eth2 - everything starts working through that NIC and stops through eth1.
Maybe you need to disable rp_filter (reverse path filtering) on the interface that has not the default route.
sysctl -w net/ipv4/conf/eth2/rp_filter=0