Number 2 is an ubuntu router(virtual box Vm) with three interfaces. Number 1 is a emulated router, and the number 3 is a remote host behind some routers. When İ ping number-3 from number-1, ping request goes thru 'a' and 'c' path, but reply comes from 'b' path. İn this case number-2 does not route ping reply to number-1, so ping fails. But if ping reply comes from 'c' path, then number-2 routes the reply packet. What is the problem with the first case??
Basically if traffic comes from a host on an interface which traffic to the host would not use, the kernel drops the traffic.
Fixing it is simple
sysctl -w net.ipv4.conf.$iface_b.rp_filter=2 sysctl -w net.ipv4.conf.$iface_c.rp_filter=2
$iface_c with the appropriate interface names.
(on older kernels
2 may be unavailable, so use