hi guys,

i have 3 machines.let say A,B,C.

Now i want to send packet from A --> C via B(i.e making B as gateway).
------------------------------------------
ifconfig on A

eth0 Link encap:Ethernet HWaddr 00:191:7A:81:AE
inet addr:192.168.1.143 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::219:d1ff:fe7a:81ae/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:208452 errors:0 dropped:0 overruns:0 frame:0
TX packets:131268 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:64673260 (61.6 MiB) TX bytes:12770590 (12.1 MiB)

eth1 Link encap:Ethernet HWaddr 4C:00:10:17:04:2D
inet addr:192.168.10.60 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::4e00:10ff:fe17:42d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9205 errors:0 dropped:0 overruns:0 frame:0
TX packets:4426 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:798767 (780.0 KiB) TX bytes:427771 (417.7 KiB)
Interrupt:17 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12347 errors:0 dropped:0 overruns:0 frame:0
TX packets:12347 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3624160 (3.4 MiB) TX bytes:3624160 (3.4 MiB)

--------------------------------------------------------------------------------------------

ifconfig on B

eth1 Link encap:Ethernet HWaddr 00:0C:29:FA:06:7A
inet addr:192.168.1.14 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fefa:67a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:51502 errors:0 dropped:0 overruns:0 frame:0
TX packets:109616 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3636753 (3.4 MiB) TX bytes:31270279 (29.8 MiB)
Interrupt:16 Base address:0x2000

eth2 Link encap:Ethernet HWaddr 00:0C:29:FA:06:84
inet addr:192.168.10.50 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fefa:684/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71616 errors:0 dropped:0 overruns:0 frame:0
TX packets:899 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15400334 (14.6 MiB) TX bytes:105754 (103.2 KiB)
Interrupt:19 Base address:0x2080

eth3 Link encap:Ethernet HWaddr 00:0C:29:FA:06:8E
inet addr:192.168.2.60 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fefa:68e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:84990 errors:0 dropped:0 overruns:0 frame:0
TX packets:142 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18605050 (17.7 MiB) TX bytes:17170 (16.7 KiB)
Interrupt:18 Base address:0x2400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
---------------------------------------------------------------------------------------------
ifconfig on C

eth1 Link encap:Ethernet HWaddr 00:0C:29:1E:7F:29
inet addr:192.168.1.13 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe1e:7f29/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8318 errors:0 dropped:0 overruns:0 frame:0
TX packets:12054 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:622107 (607.5 KiB) TX bytes:3020478 (2.8 MiB)
Interrupt:16 Base address:0x2024

eth2 Link encap:Ethernet HWaddr 00:0C:29:1E:7F:33
inet addr:192.168.20.50 Bcast:192.168.20.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe1e:7f33/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12568 errors:0 dropped:0 overruns:0 frame:0
TX packets:1134 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2260216 (2.1 MiB) TX bytes:140825 (137.5 KiB)
Interrupt:18 Base address:0x20a4

eth3 Link encap:Ethernet HWaddr 00:0C:29:1E:7F:3D
inet addr:192.168.3.60 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe1e:7f3d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7032 errors:0 dropped:0 overruns:0 frame:0
TX packets:138 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1186462 (1.1 MiB) TX bytes:19053 (18.6 KiB)
Interrupt:17 Base address:0x2424

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)

-------------------------------------------------------------------------------------------
What i want to do:

i want that when i ping from A like
# ping 192.168.3.60
this request must get out via eth1 on A
then
go to B via eth2 on B
then
come out of B via eth3 on B
and atlast
go to C via eth3 on C
then
C will reply to this request in opposite direction as that of request.

here is my route settings
-------------------------------------------------------------------------------------------------
Route settings on A

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.0 192.168.10.50 255.255.255.0 UG 0 0 0 eth1
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.10.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 0 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
-----------------------------------------------------------------------------------------------------
Route settings on B

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.0 * 255.255.255.0 U 0 0 0 eth3
192.168.2.0 * 255.255.255.0 U 0 0 0 eth3
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
192.168.10.0 * 255.255.255.0 U 0 0 0 eth2
default local.gateway 0.0.0.0 UG 0 0 0 eth1
----------------------------------------------------------------------------------------------------
Route Settings on C

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.0 * 255.255.255.0 U 0 0 0 eth3
192.168.2.0 * 255.255.255.0 U 0 0 0 eth3
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
192.168.10.0 192.168.2.60 255.255.255.0 UG 0 0 0 eth3
-----------------------------------------------------------------------------------------------


Ploblem:

i have enabled ipforwarding on all machines.but when i ping from A to C
#ping 192.168.3.60
i get reply
From 192.168.10.50 icmp_seq=5 Destination Host Prohibited
From 192.168.10.50 icmp_seq=6 Destination Host Prohibited
From 192.168.10.50 icmp_seq=7 Destination Host Prohibited
From 192.168.10.50 icmp_seq=8 Destination Host Prohibited
From 192.168.10.50 icmp_seq=9 Destination Host Prohibited
From 192.168.10.50 icmp_seq=10 Destination Host Prohibited
From 192.168.10.50 icmp_seq=11 Destination Host Prohibited
From 192.168.10.50 icmp_seq=12 Destination Host Prohibited
From 192.168.10.50 icmp_seq=13 Destination Host Prohibited
__________________________________________________ __

why this happens?? why i dont get ping response??
i really need it working..............Please help me::