I've got the following configuration:
vlan123@eth0 - range 1.2.3.0/24, with 1.2.3.4 assigned to it
br2000 - range 10.2.3.0/24
In the ip route
I see:
10.2.3.0/24 dev br2000 proto kernel scope link src 10.2.3.1
In the iptables I rewrite the destination of incoming packets (table nat
):
-A PREROUTING -d 1.2.3.4/32 -j DNAT --to-destination 10.2.3.4
If I try to ping the address 1.2.3.4
now, I do not get the forwarding I expect unfortunately. ip route get 10.2.3.4 from 2.3.4.5 iif vlan123
returns:
RTNETLINK answers: Invalid cross-device link
Which seems to confirm that the proper routing is not there. What could be the problem?
IP forwarding is enabled in sysctl and I also disabled the rp_filter for testing.