Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Current setup:

   |-- tun10 -pipe-tun0(
   |-- tun11 -pipe-tun1(
   |-- tun12 -pipe-tun2(

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" 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:


share|improve this question

So you want to have programs using different IP addresses than the 'main' IP address of the system, but these programs are actually running on this system? Do you want other computers external to your box to be able to access your programs directly?

I'm pretty sure your tun/pipe/tun arrangement isn't going to get you there. I don't understand why you want the packets to appear to route through one virtual IP address to another.

Instead of all those tun or tap interfaces, you could create a dummy interface:

modprobe dummy
ifconfig dummy0
ifconfig dummy0:1

Now, software can bind tcp or udp ports to either of those IP addresses. Other computers will need a route (pointing at the address of eth0) to reach those IP addresses.

share|improve this answer
I'm not going to need any outside computer interaction. I'm trying to simulate a network inside my computer, with one program in one virtual iface and another in other viface and manage routing between them. I've managed to do everything except for the kernel special treatment to local ifaces. – Arkaitz Jimenez Sep 18 '09 at 12:43
Your best bet will be to use virtual machines, using for example VMware Server. There's a lot more overhead, but then it's possible to have a virtual network between the host system and one or more guest OSs. With VMware Server, the 'host only networking' setting makes a simulated network that's contained within the host system. – Heath Sep 18 '09 at 15:19

But why tap10/11/12 hasn't pre configured ip-addresses? When you will assign ip-addresses to interfaces, then you will be able to ping them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.