public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael Orlitzky <michael@orlitzky.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] IPTABLES syntax change?
Date: Thu, 27 Dec 2012 11:36:36 -0500	[thread overview]
Message-ID: <50DC7914.8060705@orlitzky.com> (raw)
In-Reply-To: <87zk0zivjk.fsf@einstein.gmurray.org.uk>

On 12/27/12 06:28, Graham Murray wrote:
> Michael Orlitzky <michael@orlitzky.com> writes:
> 
>> The 'conntrack' module is supposed to be a superset of 'state', so most
>> things should be compatible. You really have two warnings there; the
>> first is for the state -> conntrack switch, and the second is because
>> you're missing the --state flag in your rules.
>>
>> In your example, you turn on the state matching,
>>
>>   iptables -A TCP_IN -p tcp -m state -m tcp -j UNSOLICITED
>>
>> but you don't specify *which* state(s) you want to match. It wants you
>> to specify --state SOMETHING. I'd guess that it used to interpret "no
>> state" as "any state."
> 
> The problem is not really the OP's fault. The problem is that if you
> have tables with the form "-m state --state XXX" at the point you
> upgrade, iptables-save (quite possibly called automatically by
> /etc/init.d/iptables stop) will save it as "-m state --state" - ie
> 'forgetting' which state(s) the rule applies to. 
> 

Youch, thanks, I'll keep an eye out for this when iptables wants a bump.
I already keep the rules in a script, but it sounds like this will
clobber the running rules after e.g. a reboot.

My first -m state rule is,

  iptables -A INPUT -p ALL -m state \
    --state ESTABLISHED,RELATED -j ACCEPT

And if what you say is true, I'd be in deep shit if it reset to,

  iptables -A INPUT -p ALL -m state -j ACCEPT

without a warning.


> 
> I think that this is a serious enough change in behaviour that an elog
> warning should have been issued.

It's not stable yet, right? File a bug (and CC me, please).


  reply	other threads:[~2012-12-27 16:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-27  0:47 [gentoo-user] IPTABLES syntax change? Walter Dnes
2012-12-27  1:43 ` Michael Orlitzky
2012-12-27 11:28   ` Graham Murray
2012-12-27 16:36     ` Michael Orlitzky [this message]
2012-12-27 17:52       ` Matthias Hanft
2012-12-27 19:04         ` Michael Orlitzky
2012-12-27 23:11     ` Walter Dnes
2012-12-27 23:50       ` Michael Orlitzky
2012-12-28  3:59         ` Walter Dnes
2012-12-28  6:07           ` Michael Orlitzky
2012-12-28  6:15             ` Michael Orlitzky
2012-12-29  2:46             ` Walter Dnes
2012-12-29  3:59               ` Kerin Millar
2012-12-29 18:32                 ` Walter Dnes
2012-12-29 18:49                   ` Jarry
2012-12-30 22:42                   ` Michael Orlitzky
2012-12-31  2:55                     ` Adam Carter
2012-12-31  3:21             ` Walter Dnes
2013-01-02 21:36               ` Michael Orlitzky
2013-01-03  3:57                 ` Pandu Poluan
2013-01-03  4:32               ` Michael Orlitzky
2013-01-04 20:17                 ` Walter Dnes
2013-01-04 20:27                   ` Michael Mol
2013-01-05  1:29                     ` Walter Dnes
2013-01-05  3:26                       ` Michael Mol
2013-01-05 11:57                         ` Mick
2013-01-06 21:54                           ` Walter Dnes

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=50DC7914.8060705@orlitzky.com \
    --to=michael@orlitzky.com \
    --cc=gentoo-user@lists.gentoo.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