I am working on a small project where I have a device with two network interfaces attached to the same subnet, iface1 and iface2. Some of the packets that arrive on iface1 should be forwarded to iface2 and I have written a rule using iptables. I see that the rule match (using LOG), but the packets seem to disappear after the PREROUTING-step (I have tried logging all possible combinations in both INPUT and FORWARD).

To allow each device access to the rest of the network, I have had to modify the routing table significantly (attached at the bottom) and I think maybe that the system gets confused during the ROUTING-step. It seems like the kernel does not understand that the new destination address is local and simply discards the packet, neither pinging the interface nor netcat (run from one another) works or give any reply.

If anyone have any tips, I would be very grateful.

Thanks in advance,

Main routing table:
Code: dev eth0  scope link  src dev eth1  scope link  src  metric 10 
default via dev eth0 
default via dev eth1  metric 10
Code:   U     0      0        0 eth0   U     10     0        0 eth1         UG    0      0        0 eth0         UG    10     0        0 eth1
Table T_eth0:
Code: dev eth0  scope link  src 
default via dev eth0
Table T_eth1:
Code: dev eth1  scope link  src 
default via dev eth1
IP Rules:
0:      from all lookup local 
32764:  from lookup T_eth1 
32765:  from lookup T_eth0 
32766:  from all lookup main 
32767:  from all lookup default