Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Anders Fugmann <afu@fugmann.dhs.org>
To: stewart.thompson@shaw.ca
Cc: Antony Stone <antony@soft-solutions.co.uk>, netfilter@lists.samba.org
Subject: Re: mangle tables.
Date: Wed, 11 Sep 2002 00:18:15 +0200	[thread overview]
Message-ID: <3D7E6FA7.5030903@fugmann.dhs.org> (raw)
In-Reply-To: FLEKIPPLAEDMJMOOBBDPOEDGCOAA.stewart.thompson@shaw.ca

Stewart Thompson wrote:
> would show the order it went through the tables. Alternately, you
> could look at the source code, or talk to someone who is familiar
Ok. I finally took a look at the code. (Quite easy to read actually)

There are 5 builtin chains:
prerouting, input, forward, output and postrouting.
and four tables: conn_track, mangle, nat and filter.

These are traversed in the following order:
(read left to right)
prerouting: 
conntrack, mangle, nat
input: 
	mangle, filter, nat, conntrack
forward: 	mangle, filter
output: 
	conntrack, mangle, nat, filter
postrouting: 
mangle, nat, conntrack

Of course, forwarded packets traverse: prerouting,forward,postrouting.
locally generated packets traverse: output,postrouting
packets for the machine itself: prerouting, input.

If you want to doublecheck, then look at lines:
041-060: netfilter_ipv4.h
223-233: ip_conntrack_standalone.c
205-217: ip_nat_standalone.c
170-181: iptable_mangle.c
117-122: iptable_filter.c

All taken from kernel 2.4.19

The sequence is defined through constants, and I do not think that these
has not changed from 2.4.18. I have not looked at other versions.


Regards
Anders Fugmann



      reply	other threads:[~2002-09-10 22:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-10  6:49 mangle tables Anders Fugmann
2002-09-10  9:38 ` Antony Stone
2002-09-10 10:05   ` Anders Fugmann
2002-09-10 10:12     ` Antony Stone
2002-09-10 10:41     ` Stewart Thompson
2002-09-10 11:09       ` Antony Stone
2002-09-10 13:04       ` Anders Fugmann
2002-09-10 20:18         ` Stewart Thompson
2002-09-10 22:18           ` Anders Fugmann [this message]

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=3D7E6FA7.5030903@fugmann.dhs.org \
    --to=afu@fugmann.dhs.org \
    --cc=antony@soft-solutions.co.uk \
    --cc=netfilter@lists.samba.org \
    --cc=stewart.thompson@shaw.ca \
    /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