This is more or less a revival of: Forwarding traffic from one ethernet interface to another
Suppose the following setup.
. 15.15.1.11 15.15.1.12
. A:eth0 --- eth0:B:xxx0 --- xxx0:C
. 15.15.0.10 15.15.0.11
Where A, B, and C are separate nodes, and xxx0 is some non-ethernet networking interface.
The following addresses and routings are assigned at each node:
A
ip addr add 15.15.0.10 dev eth0
ip route add 15.15.0.0/16 dev eth0
B
ip addr add 15.15.0.11 dev eth0
ip route add 15.15.0.0/24 dev eth0
ip addr add 15.15.1.11 dev xxx0
ip route add 15.15.1.0/24 dev xxx0
C
ip addr add 15.15.1.12 dev xxx0
ip route add 15.15.1.0/16 dev xxx0
At this point, from A or C, I am capable of pinging B via
ping 15.15.1.11
ping 15.15.0.11
From B, I can ping A or C.
ping 15.15.0.10
ping 15.15.1.12
However, I am unable to ping C from A or vice versa.
I've tried the following with no success:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -i eth0 -o xxx0 -j ACCEPT
iptables -A FORWARD -i xxx0 -o eth0 -j ACCEPT