From: "Bob Beers" Date: Tue, 21 Nov 2006 16:05:23 +0000 Subject: Re: [LARTC] Re: iptables rule not matching after stream begins Message-Id: <4f6ba3b0611210805g167b393dk7861b5ce38edeae8@mail.gmail.com> List-Id: References: <4f6ba3b0611201646k750995d3oe0cd605890b7f2a7@mail.gmail.com> In-Reply-To: <4f6ba3b0611201646k750995d3oe0cd605890b7f2a7@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org On 11/21/06, Alexey Toptygin wrote: > On Tue, 21 Nov 2006, Bob Beers wrote: > > > Let me try to restate my question: > > > > Is it a common problem that inserting a rule after a (UDP) stream is > > established does not match the rule, even though the exact same > > rule for the exact same stream does match, as long as it is inserted > > before the first packet of the stream arrives? > > This is the way it is designed: PREROUTING rules in the nat table are only > checked for packets that haven't already been assigned to a connection. If > you want, you can use the conntrack tool to flush the connection states > after you add a new rule. Ah, yes, this sounds like what I need. Please excuse my ignorance, but how does one "use the conntrack tool to flush the connection states after you add a new rule"? I have read through several tutorials and the iptables man pages, but did not yet find this particular gem. In my ideal solution, I would flush only the connection in question, to avoid any perturbance of other connections. I guess you mean this: and/or this: I will RTF documentation, now that I see it ... But, I wonder, is there a shortcut to the behavior I want through iptables --ctstatus and friends? > > Alexey > Thank you all very much for the hints so far. Bob _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc