I am running into trouble while trying to set-up a iptables routing policy. I have two machines on the same sub-network (xxx.xxx.153.0). One of the machines is used as a default gw for the other (xxx.xxx.153.250 is a gateway for xxx.xxx.153.142 and xxx.xxx.153.254 is a gw for xxx.xxx.153.250). There is no explanation for why the xxx.xxx.153.250 is in the middle -- xxx.xxx.153.142 can go straight to xxx.xxx.153.254, but is is like that for now.
I am trying to find an iptable rule to be executed on the xxx.xxx.153.250 machine to route the packets. I was trying something like:
iptables -A FORWARD -i eth0 -s xxx.xxx.153.142 -o eth0 -j ACCEPT
but it doesn't seem enough. I am running openwrt on xxx.xxx.153.250
Any ideas? Thanks