Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Prerouting question
Date: Tue, 6 Apr 2004 19:16:38 +0100	[thread overview]
Message-ID: <200404061916.39265.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <000801c41c01$01e18b40$0464a8c0@stu>

On Tuesday 06 April 2004 7:00 pm, Stuart Lamble wrote:

> Hi All
>
> If prerouting is the first rule a packet touches when arriving at the
> firewall, why then do we not set the default to DROP here and allow
> through what we need.

<Pedantic response>
Because PREROUTING is a nat table, and nat tables are for Network Address 
Translation.   FORWARD and INPUT are filter tables (the default if you don't 
specify in iptables rules), and that's where filtering operations such as 
DROP, REJECT, ACCEPT should be done.
</Pedant>

<Pragmatic response>
Because all sorts of things will go wrong if you try this.
</Pragmatist>

<Conntrack response>
Because all traffic passing through the interface has to go through the 
PREROUTING table, and this is where lots of connection tracking magic happens 
in the background, meaning that you (read: the rules in the PREROUTING table) 
don't see many of the packets going past, yet they still obey the default 
chain policy.   Therefore you can't catch all the packets you need to allow 
(they get handled behind the scenes), and you don't want to DROP any of the 
ones you can't see.
</Conntrack>

Regards,

Antony.

-- 
I'm pink, therefore I'm Spam.

                                                     Please reply to the list;
                                                           please don't CC me.



  reply	other threads:[~2004-04-06 18:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-06 18:00 Prerouting question Stuart Lamble
2004-04-06 18:16 ` Antony Stone [this message]
2004-04-06 18:23   ` Cedric Blancher
2004-04-06 18:28   ` Stuart Lamble
2004-04-06 18:21 ` Cedric Blancher

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=200404061916.39265.Antony@Soft-Solutions.co.uk \
    --to=antony@soft-solutions.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox