All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@riverviewtech.net>
To: netfilter@lists.netfilter.org
Subject: Re: A Simple Question
Date: Fri, 12 Aug 2005 00:27:44 -0500	[thread overview]
Message-ID: <42FC3350.3050701@riverviewtech.net> (raw)
In-Reply-To: <5c685153050809171164af25e4@mail.gmail.com>

Robb Bossley wrote:
> I have been using Linux for quite some time, and I really enjoy the
> power that is available with netfilter.  Thank you for all of your
> input into the development and testing of it.
> 
> I have used other people's scripts to configure my firewall for a
> number of years, though I usually rolled my own kernels for this.
> 
> I have been reading the mailing list posts and it seems that most of
> you who are very knowledgeable with netfilter would propose a default
> policy of DROP on both the INPUT and FORWARD chains.
> 
> iptables -P INPUT DROP
> iptables -P FORWARD DROP
>  
> However, I have noticed that a number of what I would consider to be
> strong contenders in the market use default policies of ACCEPT and
> then have a DROP rule at the end of the tables / chain.
> 
> iptables -P INPUT ACCEPT
> iptables -P FORWARD ACCEPT
> ...................................(other stuff here)..........................
> iptables -A INPUT -j DROP
> iptables -A FORWARD -j DROP
> 
> I'm confused.  Which is preferred for security and why?  (Or is this
> just six of one, half a dozen of another?)

IMHO both methods are just about equally as effective.  However I believe that by using the default policy of a chain you can save adding a rule that must be traversed and thus make the processing just slightly faster.  On the other hand you can only set default policies on built in chains and thus you must do your own ""policy equivalent at the end of user defined chains with the rules that you have noticed.  Thus for uniformity it may just be easier for some firewall authors to stick with the method that they know will work in EVERY chain than to have to remember which chain they are in.  To me this issue is really 5.5 of one dozen and 6.5 of another, close but not exactly the same.



Grant. . . .


  parent reply	other threads:[~2005-08-12  5:27 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-10  0:11 A Simple Question Robb Bossley
2005-08-10 19:58 ` /dev/rob0
2005-08-11  5:54 ` Jan Engelhardt
2005-08-12  5:27 ` Grant Taylor [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-01-17 16:24 A simple question Ajit K Jena
2011-01-17 16:32 ` Michiel Muhlenbaumer
2004-08-19 17:58 Hudson Delbert J Contr 61 CS/SCBN
2004-08-19 17:47 Daniel Chemko
2004-08-19 17:14 Daniel Chemko
2004-08-19 17:31 ` Nick Drage
2004-08-19 15:15 Hudson Delbert J Contr 61 CS/SCBN
2004-08-19 11:04 Jason Opperisano
2004-08-19  2:36 Sudheer Divakaran
2004-08-19  4:18 ` Mark E. Donaldson
2004-08-19  8:39   ` Torsten Luettgert
2004-08-19  4:52 ` Dhananjoy Chowdhury
2004-08-19 15:46 ` Erick Sanz
2004-04-06  2:25 Gianni Pucciani
2004-04-05 22:40 ` Antony Stone
2004-04-06 13:26   ` Gianni Pucciani
2003-07-12 15:20 Performance difference between two raid0 arrays on same drives? Gordon Henderson
2003-07-16 18:11 ` A simple question Donghui Wen
2003-06-27  8:56 A Simple question Jad Saklawi
2003-06-27  9:32 ` Glynn Clements
2003-06-27 17:57 ` chuckw
2002-08-09  1:26 A simple question ed Wang
2002-08-09 16:57 ` David Love
2001-05-07 15:29 Hai Xu
2001-05-07 15:34 ` Robert M. Love
2001-05-07 15:43 ` Feng Xian

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=42FC3350.3050701@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --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.