ipt_ROUTE loopback

From: Jon Masters
Date: Wed Nov 16 2005 - 22:02:01 EST


I'm trying to find an easy way to have a Linux box completely ignore
the local routing table and have traffic destined for one interface go
out of a loopback cable and back into the other rather than traversing
the local routing within the host, viz:

| <--- loopback cable

This is completely against normal practice, but useful for test. I've
so far tried playing around with iproute2 and have this evening built
up ipt_ROUTE, which seems more promising. I can get traffic forced out
of the "correct" interface and bypass the local routing table, but it
always has the destination MAC of the first interface when it reaches
the second.

So, I can bodge the destination MAC (I'm still deciding how to do that
- maybe I'll take apart ipt_ROUTE and have it do MAC rewriting too)
but I'm curious as to whether there's a "right" way to do this that
I've so far missed? I've considered using the briding code in some
weird kind of transparent-yet-not-really bridge setup, but I don't
really want to do that.

Any suggestions? This seems like something others must have also
wanted to do. I'm happy to break things in doing it, but I'm hopeful
for a "you missed this page...".

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/