External routing for local interfaces in a virtualized network

Posted by Arkaitz Jimenez on Server Fault See other posts from Server Fault or by Arkaitz Jimenez
Published on 2009-09-16T09:56:39Z Indexed on 2010/03/09 2:08 UTC
Read the original article Hit count: 365

Filed under:
|

Current setup:

br0|
   |-- tun10 -pipe-tun0(192.240.240.1)
   |-- tun11 -pipe-tun1(192.240.240.2)
   |-- tun12 -pipe-tun2(192.240.240.3)

The pipe program is a custom program that forwards data back2back between two tun interfaces.

The idea is puting 2 programs in .2 and .3 while keeping .1 as the local interface in the current machine. The main problem is that I want to route packets to .2 and to .3 through .1 and br0, but as they are local interfaces, the kernel ignores any routing instruction, it just delivers the packet to the proper interface.

Tried iptables, but the nat table doesn't even see ping packets to those ifaces. A "ping 192.240.240.2" delivers a icmp packet with source and dest .2 to tun1, ideally it should deliver a source .1 dest .2 at tun1 through tun0-br0-tun1

Any hint?

Here the output of some commands:

Output

© Server Fault or respective owner

Related posts about linux

Related posts about networking