Linux – network setup does not work: icmp works, tcp not

linuxroutertcp

I experiencing a small problem with my network setup:
Setup


In this network, I can ping from 192.168.3.0 to 192.168.2.0 and reverse, but it does not work with TCP connections. The handshake fails (no ack).

Below is a Wireshark capture and my config:
wireshark
icmp redirects to 192.168.3.2.

config router 192.168.2.1:
route 192.168.3.0/24 dev eth-right via 192.168.2.2  

config router 192.168.3.1:
route 192.168.2.0/24 dev eth-left via 192.168.3.2

config router 192.168.2/3.2:
route 192.168.2.0/24 dev eth-left proto kernel  scope link  src 192.168.2.2
route 192.168.3.0/24 dev eth-right proto kernel  scope link  src 192.168.3.2
tcp_timestamps = 0 / 1 no effect
tcp_window_scaling = 0 / 1 no effect
ip_forward = 1
iptables:
    *filter
    :INPUT ACCEPT [558387:1126476966]
    :FORWARD ACCEPT [7256:5227071]
    :OUTPUT ACCEPT [366250:1071395133]
    -A INPUT -p udp -m udp --sport 67:68 --dport 67:68 -j DROP
    COMMIT

Best Answer

route 192.168.2.0/24 dev eth-left proto kernel  scope link  src 192.168.2.2
route 192.168.3.0/24 dev eth-right proto kernel  scope link  src 192.168.3.2

The src attribute is the problem. It should look like this:

route 192.168.2.0/24 dev eth-left proto kernel  scope link
route 192.168.3.0/24 dev eth-right proto kernel  scope link