All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksandar Milivojevic <amilivojevic@pbl.ca>
To: netfilter@lists.netfilter.org
Subject: Re: Can anyone tell me how to do this?
Date: Thu, 23 Sep 2004 13:29:16 -0500	[thread overview]
Message-ID: <415315FC.8030407@pbl.ca> (raw)
In-Reply-To: <1095960665.6715.23.camel@wolfpack.ljm.dom>

Jason Opperisano wrote:
> i'm pretty sure i recall reading somewhere that the INPUT vs. FORWARD
> decision is solely based on IP, not interface.  so even though
> conceptually it seems as though the packet would be "forwarded" from
> eth1 to eth0, it's still just an INPUT packet, as it is destined for a
> local IP (172.16.12.130)...  the "IN=" in a log entry should still show
> eth1, i think...

You are pretty right about that one.  If packet is to be delivered to 
the local process, it will end up in INPUT chain.  Decision is not made 
based upon interfaces or addresses, it is purely made based on whether 
or not packet will be delivered to local process, or forwarded to 
another (or same) interface.  This is because all the packets from all 
interfaces first go to the PREROUTING chain of nat table, after that 
routing decisions are made, and after that if packet is to be "routed" 
to local process it goes to INPUT chain of filter table, otherwise it 
goes to FORWARD chain of filter table and than to POSTROUTING chain of 
nat table and to the physical interface.  So, once packet ends up in 
FORWARD chain, kernel has already made decision through which interface 
it will be sent out, and there is no way back.

Jim Cliver has a nice diagram showing all this (one image is worth 
thousands of words):

    http://www.aptalaska.net/~jclive/IPTablesFlowChart.pdf

-- 
Aleksandar Milivojevic <amilivojevic@pbl.ca>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7


  reply	other threads:[~2004-09-23 18:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-22 17:12 Can anyone tell me how to do this? Daniel Chemko
2004-09-23 13:01 ` Eric Ellis
2004-09-23 13:22   ` Dominic Iadicicco
2004-09-23 14:55     ` Jason Opperisano
2004-09-23 15:14       ` Dominic Iadicicco
2004-09-23 16:15         ` Jason Opperisano
2004-09-23 16:44           ` Samuel Díaz García (ArcosCom)
2004-09-23 17:28             ` Dominic Iadicicco
2004-09-23 17:48               ` Jason Opperisano
2004-09-23 18:26                 ` Dominic Iadicicco
2004-09-23 16:58           ` Dominic Iadicicco
2004-09-23 17:31             ` Jason Opperisano
2004-09-23 18:29               ` Aleksandar Milivojevic [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-09-22 17:04 Hudson Delbert J Contr 61 CS/SCBN
2004-09-22 16:59 Daniel Chemko
2004-09-22 17:29 ` Alistair Tonner
2004-09-22 14:09 Dominic Iadicicco
2004-09-22 14:25 ` Eric Leblond
2004-09-22 14:45   ` Dominic Iadicicco
2004-09-22 15:07     ` Eric Leblond
2004-09-22 15:29       ` Dominic Iadicicco
2004-09-22 14:29 ` Jason Opperisano

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=415315FC.8030407@pbl.ca \
    --to=amilivojevic@pbl.ca \
    --cc=netfilter@lists.netfilter.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.