Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Kostas Pelechrinis <kpele_ntua@yahoo.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: netfilter@vger.kernel.org
Subject: Re: Redirecting flows among one machine's interfaces
Date: Tue, 9 Nov 2010 16:51:51 -0800 (PST)	[thread overview]
Message-ID: <446996.78588.qm@web31608.mail.mud.yahoo.com> (raw)
In-Reply-To: <alpine.LNX.2.01.1011100033030.7017@obet.zrqbmnf.qr>

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@medozas.de> wrote:

> From: Jan Engelhardt <jengelh@medozas.de>
> Subject: Re: Redirecting flows among one machine's interfaces
> To: "Kostas Pelechrinis" <kpele_ntua@yahoo.com>
> Cc: netfilter@vger.kernel.org
> 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.
> 


      

  reply	other threads:[~2010-11-10  0:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-09 22:59 Redirecting flows among one machine's interfaces Kostas Pelechrinis
2010-11-09 23:33 ` Jan Engelhardt
2010-11-10  0:51   ` Kostas Pelechrinis [this message]
2010-11-10  8:47 ` Pascal Hambourg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=446996.78588.qm@web31608.mail.mud.yahoo.com \
    --to=kpele_ntua@yahoo.com \
    --cc=jengelh@medozas.de \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox