Linux Netfilter discussions
 help / color / mirror / Atom feed
* Dynamically adding rules - are connection tracking states maintained?
@ 2008-04-24 16:12 noa levy
  2008-04-24 19:24 ` Pascal Hambourg
  0 siblings, 1 reply; 9+ messages in thread
From: noa levy @ 2008-04-24 16:12 UTC (permalink / raw)
  To: netfilter

Hi All,

I'm trying to understand the impact of dynamically adding iptables rules, in terms of the resulting disruption to the firewall's performance. When I add a rule to (or delete a rule from) iptables, while it is running, does that have any effect on the states in the connection tracking table? Will the table be flushed? Are states linked to the rule that allowed the initial packet in, so that if a rule is deleted, only the corresponding state entry will be flushed?

Thank you!
Noa  


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Dynamically adding rules - are connection tracking states maintained?
@ 2008-04-28 22:27 noa levy
  2008-04-29 23:37 ` Pascal Hambourg
  0 siblings, 1 reply; 9+ messages in thread
From: noa levy @ 2008-04-28 22:27 UTC (permalink / raw)
  To: Jan Engelhardt, Pascal Hambourg; +Cc: netfilter

Thank you very much for your replies. 
I still don't understand one thing though: Let's say I delete a rule that allows SSH traffic. There are probably many entries in the conntrack table for SSH sessions. Will these sessions continue to be allowed in, even though I have just deleted the rule that allowed SSH (and my default policy is DROP)? 


On Thursday 2008-04-24 21:24, Pascal Hambourg wrote:
> noa levy a écrit :
>> 
>> When I add a rule to (or delete a rule from) iptables,
>> while it is running, does that have any effect on the states in the
>> connection tracking table?
>
> No.
>
>> Will the table be flushed?
>
> No.

the conntrack table remains;
the fw rule table is atomically exchanged.

>> Are states linked  to the rule that allowed the initial packet in [....] ?
>
> No.

(No,) but parameters attached to rules may get reset when loading a
new ruleset into the kernel. Now what constutitues an "attached" data
portion hm... xt_quota for example stores its quota counter with the
rule. xt_recent for example on the other hand stores its data in a
separate malloc'ed area that is safe.
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-05-02  1:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-24 16:12 Dynamically adding rules - are connection tracking states maintained? noa levy
2008-04-24 19:24 ` Pascal Hambourg
2008-04-25 17:39   ` Jan Engelhardt
  -- strict thread matches above, loose matches on Subject: below --
2008-04-28 22:27 noa levy
2008-04-29 23:37 ` Pascal Hambourg
2008-05-01 20:22   ` noa levy
2008-05-01 22:44     ` Josh Cepek
2008-05-01 22:56       ` Petr Pisar
2008-05-02  1:10       ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox