Thanks a lot. I am checking iproute2 now but can you give any pointers/hints. Thanks a lot, Kostas --- On Tue, 11/9/10, Jan Engelhardt <jengelh@xxxxxxxxxx> wrote: > From: Jan Engelhardt <jengelh@xxxxxxxxxx> > Subject: Re: Redirecting flows among one machine's interfaces > To: "Kostas Pelechrinis" <kpele_ntua@xxxxxxxxx> > Cc: netfilter@xxxxxxxxxxxxxxx > Date: Tuesday, November 9, 2010, 6:33 PM > On Tuesday 2010-11-09 23:59, Kostas > Pelechrinis wrote: > > >Hi all, > > > >I am not very familiar with iptables, but what I am > trying to achieve > >is the following: > > > >I have a machine with two interfaces (let's say if1 -- > with ip address > >a.b.c.d -- and if2 -- with ip address x.y.z.w) both > connected to the > >internet. One of the two interfaces is the default > interface (e.g., > >if1). Whatever flow is initiated towards a > destination in the Internet > >is going out if1. I want to use iptables in order > to redirect some of > >the flows to if2. Is there a way to do this using > iptables? > > Using -j MARK and iproute2 policy routing. > > >I have tried some rules (e.g., iptables -A FORWARD -d > k.l.m.n -o if2 -j > >ACCEPT // where k.l.m.n is the destination ip address > of the flow I > >want to redirect) but with no luck. > > Well guess why: it _tests_ whether the outgoing interface > is (already) > if2. > -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html