From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pascal Hambourg Subject: Re: chain/table traversal for loopback packets Date: Thu, 13 May 2010 21:52:35 +0200 Message-ID: <4BEC5883.6000309@plouf.fr.eu.org> References: Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: netfilter-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="iso-8859-1" To: Curby Cc: netfilter@vger.kernel.org Hello, Curby a =E9crit : > Hello, I'm trying to understand > http://www.frozentux.net/iptables-tutorial/images/tables_traverse.jpg >=20 > Would a packet created locally and sent over the loopback interface > traverse the POSTROUTING and PREROUTING hooks as implied by the > diagram, Yes. However be aware that the nat/PREROUTING chain is skipped even for the first packet of a new connection because at that stage the connection is already confirmed. Thus destination NAT must be performed in OUTPUT. > or does the last Routing Decision notice that it's bound for > the local host and send it straight to the beginning of the INPUT > hook? No.