All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Lister <john.lister@kickstone.com>
To: William Fitzgerald <wfitzgerald@tssg.org>
Cc: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: Query: Stateful parameters Explicitly and Implicitly defined, which is it?
Date: Wed, 21 Oct 2009 08:21:50 +0100	[thread overview]
Message-ID: <4ADEB68E.6070803@kickstone.com> (raw)
In-Reply-To: <4ADE2689.4070707@tssg.org>

William Fitzgerald wrote:
> Dear experts,
>
> If a rule has a state of NEW does it implicitly imply ESTABLISHED also?
>
> Looking at examples on the web I see references to both.
>
> For example to permit access to an internal Web server, which of the 
> straw-man rules are correct?
>
> Implicit Established Example:
> iptables -a FORWARD -i eth0 --dport 80 -m state --state NEW -j ACCEPT
>
> Explicit Established Example:
> iptables -a FORWARD -i eth0 --dport 80 -m state --state 
> NEW,ESTABLISHED -j ACCEPT
>
I'm no expert, but i would usually have a rule that accepts any 
established connections first, followed by ones where the state is new 
and has the conditions you require. I've also added RELATED below as 
you'd often want those to be accepted by default as well.

iptables -a FORWARD -m state --state RELATED, ESTABLISHED -j ACCEPT
iptables -a FORWARD -i eth0 --dport 80 -m state --state NEW -j ACCEPT
...

John

  reply	other threads:[~2009-10-21  7:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20 21:07 Query: Stateful parameters Explicitly and Implicitly defined, which is it? William Fitzgerald
2009-10-21  7:21 ` John Lister [this message]
2009-10-21  7:59 ` Mart Frauenlob
2009-10-21  8:46   ` William Fitzgerald
2009-10-21  9:33     ` Mart Frauenlob
2009-10-21  9:46       ` William Fitzgerald
2009-10-21 10:08         ` Mart Frauenlob

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=4ADEB68E.6070803@kickstone.com \
    --to=john.lister@kickstone.com \
    --cc=netfilter@vger.kernel.org \
    --cc=wfitzgerald@tssg.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.