problem routing packets from one interface to another
hi, i have a system with 2 interfaces eth0, and eth1. eth0 is 192.168.0.250 and connected to gateway 192.168.0.2.
eth1 is connected to 220.127.116.11 via a swtich.
i am trying to route packets from 18.104.22.168 to gateway 192.168.0.2, which means i need to route 192.123.123.x packets coming into eth1 interface out via eth0 interface.
i set ip_forward file to 1.
i ran this command:
route add -net 22.214.171.124 netmask 255.255.255.0 dev eth0
route add default gw 192.168.0.2
i can ping from 126.96.36.199 to 192.168.0.250, but i can't ping to 192.168.0.2
i think packets are not being forwarded to eth0.
my routing table looks something like this:
gteway Genmask Flags Ref Iface
188.8.131.52 * 255.255.255.0 U eth1
192.168.0.0 * 255.255.255.0 U eth0
184.108.40.206 * 255.255.255.0 U eth0
default 192.168.0.2 0.0.0.0 UG eth0
can anyone tell me what is missing?
thank you in advance.