Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Erik Schorr <erik-lists@arpa.org>
To: netfilter@vger.kernel.org
Cc: gapsf@yandex.ru
Subject: Re: iptables-restore - does  it breaks existing connections?
Date: Fri, 27 May 2011 08:06:16 -0700	[thread overview]
Message-ID: <4DDFBDE8.8010808@arpa.org> (raw)
In-Reply-To: <1748026766.20110525102949@yandex.ru>

On 05/24/2011 08:29 PM, gapsf@yandex.ru wrote:
> For example, when (re)loading the same set of rules?

When using iptables-restore or a similar method, the new table is loaded 
atomically.  As long as the new ruleset permits the traffic, there 
should be no dropped connections (or connection states).  The kernel 
keeps connection state information independently of firewall rules.

The best way to explicitly guarantee that all your connections stay up 
if you plan on loading a different ruleset, is to make sure there's a 
rule near the top of each of your INPUT/OUTPUT/FORWARD chains that 
accepts established/related connections:

iptables -I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -I OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -I FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

-- 
Erik Schorr KD6AUT
Advocate and Consultant
VMware/Iptables/Exim/Perl

  reply	other threads:[~2011-05-27 15:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25  3:29 iptables-restore - does it breaks existing connections? gapsf
2011-05-27 15:06 ` Erik Schorr [this message]
2011-05-27 15:58   ` Jan Engelhardt
2011-05-27 22:31     ` Erik Schorr
2011-05-27 22:37       ` Jan Engelhardt

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=4DDFBDE8.8010808@arpa.org \
    --to=erik-lists@arpa.org \
    --cc=gapsf@yandex.ru \
    --cc=netfilter@vger.kernel.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