I have a router with 2 interaces eth0 with IP 10.2.40.4 and eth2 with IP 10.2.20.3 I want the traffic from 10.2.40.0/24 network to egress out of 10.2.20.3 interface whose next hop IP is 10.2.20.1
I followed the below doc: https://unix.stackexchange.com/questions/186636/forward-packets-from-one-interface-to-another-interface-using-iptables
But was unable to get it through. Running a tcpdump on eth0, I can see traffic from 10.2.40.3(machine IP) to 8.8.8.8 and on eth2 I can see the traffic getting converted to 10.2.40.4 to 8.8.8.8
But the return traffic seems to be getting dropped.