All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@vger.kernel.org
Subject: Re: How does netfilter decide which in/out-interface a packet has
Date: Wed, 03 Mar 2010 18:09:14 +0100	[thread overview]
Message-ID: <4B8E97BA.9070103@plouf.fr.eu.org> (raw)
In-Reply-To: <20100303165422.18973x8p8ccy6s84@webmail.physik.uni-muenchen.de>

Hello,

Christoph Anton Mitterer a écrit :
> 
> How does netfilter decide which in/out-interface a packet has?

It doesn't. The packet decides which input interface is arrives on, and
the routing decision decides which output interface it leaves.

> I mean the following:
> Image I have a host with the following interfaces and addresses:
> lo: 127.x.x.x and :1/128
> eth0: 88.88.88.88
> 99.99.99.99 is a remote address (packets come in via eth0)
> 
> Now consider the following cases (source --> destination):
> "internal traffic":
> 127.x.x.x   --> 127.x.x.x     => quite clear, in=lo out=lo
> 127.x.x.x   --> 88.88.88.88   => in=??? out=???
> 88.88.88.88 --> 88.88.88.88   => in=??? out=???
> 88.88.88.88 --> 127.x.x.x     => in=??? out=???

lo in all cases.

> "incoming traffic (from remote):
> 99.99.99.99 --> 127.x.x.x     => is that possible at all? how would  
> the in=/out= be?

eth0, but the packet is discarded after PREROUTING by the input routing
decision which prohibits receiving a packet with a loopback address from
outside (a non loopback interface).

> 99.99.99.99 --> 88.88.88.88   => quite clear, in=eth0 out=n/a

Yup.

> "outgoing traffic (to remote):
> 127.x.x.x --> 99.99.99.99     => is that possible at all?

Not possible, the output routing decision prohibits sending a packet
with a loopback address outside the host (on a non loopback interface).

> 88.88.88.88 --> 99.99.99.99   => quite clear, in=n/a out=eth0

Yup.

  reply	other threads:[~2010-03-03 17:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03 15:54 How does netfilter decide which in/out-interface a packet has Christoph Anton Mitterer
2010-03-03 17:09 ` Pascal Hambourg [this message]
2010-03-04 10:28   ` Christoph Anton Mitterer
2010-03-04 22:59     ` Pascal Hambourg
2010-03-07  3:14       ` Christoph Anton Mitterer
2010-03-07 12:45         ` 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=4B8E97BA.9070103@plouf.fr.eu.org \
    --to=pascal.mail@plouf.fr.eu.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.