From: Jason Opperisano <opie@817west.com>
To: netfilter@lists.netfilter.org
Subject: Re: simple question
Date: Wed, 27 Apr 2005 10:21:45 -0400 [thread overview]
Message-ID: <20050427142144.GA22455@bender.817west.com> (raw)
In-Reply-To: <a0f69e50504270335efe7915@mail.gmail.com>
On Wed, Apr 27, 2005 at 04:35:15PM +0600, Askar wrote:
> hi list
>
> If I put "iptables --policy FORWARD ACCEPT" , still I need a line i-e
>
> iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
two thoughts:
1) if your last rule in the FORWARD chain is:
iptables -A FORWARD -j DROP
then your FORWARD chain POLICY will never be enforced, as all packets
will be matched and dropped by the last rule. the only reason i
bring this up is that i keep seeing rule sets that do this: POLICY
set to ACCEPT and last rule set to DROP.
2) performance. the *vast* majority of packets will match the "-m state
--state ESTABLISHED,RELATED" rule. putting it first in your built-in
chains means that the vast majority of your packets will only have
to traverse one rule before moving on. relying on the chain POLICY
to match these packets means these packets have to traverse *every*
rule before moving on. for large rule sets, this is just poor design.
final thought: setting the default policy of your firewall to ACCEPT
isn't very good "firewalling," IMHO--but that's really more of
philosophical debate than a technical one. no matter how permissive the
rules end up being, I always start with a default deny, and then allow
specific traffic.
-j
--
"Peter: You know, I oughta just give you some beer. Goes straight
through you.
Stewie: Wonderful. And while we're at it, we can light up a doobie and
watch porn.
Peter: Eh... yeah?"
--Family Guy
next prev parent reply other threads:[~2005-04-27 14:21 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-27 10:35 simple question Askar
2005-04-27 10:50 ` Mohamed Eldesoky
2005-04-27 10:58 ` Askar
2005-04-27 11:04 ` Cedric Blancher
2005-04-27 11:07 ` Cedric Blancher
2005-04-27 14:21 ` Jason Opperisano [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-04-16 2:27 Simple Question Jeff
2007-05-22 12:35 simple question Filka Michal
[not found] ` <da3a2a260705221120x3216601doee80f297904493a0@mail.gmail.com>
2007-05-23 5:33 ` Filka Michal
2006-04-14 19:27 Nebojsa Trpkovic
2006-04-15 18:33 ` Jacob Shin
2006-02-19 0:12 Niv
2006-02-19 0:44 ` Greg KH
2006-02-19 2:19 ` Mark Rosenstand
2006-02-19 2:26 ` Niv
2006-01-03 21:42 Simple question LWATCDR
2006-01-03 22:24 ` James Courtier-Dutton
2005-05-19 6:23 simple question Ivan Georgiev
2005-05-19 6:23 ` Mark Studebaker
2005-05-19 6:23 ` Simple Question Jean Delvare
2005-05-19 6:23 ` Craig H. Block
2004-05-05 15:27 Simple question Oriol Magrané
2004-05-05 16:19 ` Aleksandar Milivojevic
2004-05-05 16:25 ` Antony Stone
2004-05-05 17:43 ` Martijn Lievaart
2004-05-06 21:45 ` Antony Stone
2003-07-31 17:53 simple question Zyman, Andy
2003-07-31 19:14 ` David Hinds
2003-07-31 20:41 ` Zyman, Andy
2003-07-31 20:59 ` David Hinds
2003-07-31 21:26 ` Joshua Schmidlkofer
2003-02-12 18:32 Simple question j.logsdon
2003-02-12 18:53 ` Jesse Pollard
2003-02-12 21:40 ` j.logsdon
2003-02-12 23:28 ` Russell Coker
2003-02-12 20:45 ` Russell Coker
2003-02-12 21:47 ` Howard Holm
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=20050427142144.GA22455@bender.817west.com \
--to=opie@817west.com \
--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.