This is the gateway:
.............................. +----------------------------------------------+
192.168.0.0/24---------|eth0(192.168.0.254)..............................|
192.168.2.0/24---------|eth2(192.168.2.254)...eth1(192.168.1.254)|-------192.168.1.0/24
...............................+----------------------------------------------+
[bad ascii-art

]
the routing table from the gateway:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 eth2
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
localnet * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 1 0 0 eth1
the routing table from 192.168.0.10 (on the 192.168.0.0 net):
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.0.254 0.0.0.0 UG 0 0 0 eth0
on the gateway I exec:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -i eth0 -j ACCEPT
from GW I can ping all the machines
from 192.168.0.10 I can ping 192.168.0.254(GW)
why I can't ping from 192.168.0.10 to 192.168.1.1(located on 192.168.1.0 net)
thanks