From: "Remzi AKYÜZ" <linuxliste@gmail.com>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: "Dâniel Fraga" <fragabr@gmail.com>,
netfilter@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re: Linux 4.3.1 regression: -m state returns "Protocol wrong type for socket"
Date: Sat, 12 Dec 2015 13:50:13 +0200 [thread overview]
Message-ID: <566C09F5.6080606@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1512121116390.13421@blackhole.kfki.hu>
Hi,
"-m state " could not use without protocol. Therefore we must use witch
-p tcp.
If we have alot of rule we can use additional parameter like as;
iptables -A INPUT -p tcp --dport 22 -s 1.2.3.4 -m state --state
ESTABLISHED,RELATED -j ACCEPT
maybe this is better;
iptables -A INPUT -p tcp --dport 22 -s 1.2.3.4 -m conntrack --ctstate
RELATED,ESTABLISHED -j ACCEPT
What you need, iptables give it to you. :-)
12-12-2015 12:18 tarihinde Jozsef Kadlecsik yazdı:
> On Sat, 12 Dec 2015, Remzi AKYÜZ wrote:
>
>> Please use with -p tcp
>>
>> iptables -A INPUT -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT
> That's not a solution at all, this can break a huge number of
> configurations.
>
> Best regards,
> Jozsef
>
>> 12-12-2015 05:38 tarihinde Dâniel Fraga yazd?:
>>> After upgrading the kernel from 4.3.0 to 4.3.1 (with the same
>>> configuration), -m state doesn't work anymore.
>>>
>>> iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
>>>
>>> returns:
>>>
>>> iptables: Protocol wrong type for socket.
>>>
>>> I'm using iptables v1.4.21.
>>>
>>> Any hints?
>>>
>> --
>> 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
>>
> -
> E-mail : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
> PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
> Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
> H-1525 Budapest 114, POB. 49, Hungary
next prev parent reply other threads:[~2015-12-12 11:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <n4g4s8$4pr$1@ger.gmane.org>
[not found] ` <566BEF33.7090501@gmail.com>
2015-12-12 10:18 ` Linux 4.3.1 regression: -m state returns "Protocol wrong type for socket" Jozsef Kadlecsik
2015-12-12 11:50 ` Remzi AKYÜZ [this message]
2015-12-12 12:04 ` Jozsef Kadlecsik
2015-12-12 12:09 ` Noel Kuntze
2015-12-12 16:06 ` Dâniel Fraga
2015-12-12 19:32 ` Pablo Neira Ayuso
2015-12-12 19:35 ` Dâniel Fraga
2015-12-12 19:42 ` Dâniel Fraga
2015-12-12 23:20 ` Florian Westphal
2015-12-12 23:31 ` Dâniel Fraga
2015-12-12 23:34 ` Jan Engelhardt
2015-12-13 0:05 ` Dâniel Fraga
2015-12-13 0:30 ` Jan Engelhardt
2015-12-13 0:32 ` Dâniel Fraga
2015-12-13 0:47 ` Jan Engelhardt
2015-12-14 20:47 ` Jozsef Kadlecsik
2015-12-14 20:55 ` Pablo Neira Ayuso
2015-12-14 21:19 ` Jozsef Kadlecsik
2015-12-14 21:21 ` Jozsef Kadlecsik
2015-12-12 19:10 ` Pablo Neira Ayuso
2015-12-12 19:22 ` Noel Kuntze
2015-12-12 19:22 ` Noel Kuntze
2015-12-12 19:38 ` Pablo Neira Ayuso
2015-12-12 19:34 ` Dâniel Fraga
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=566C09F5.6080606@gmail.com \
--to=linuxliste@gmail.com \
--cc=fragabr@gmail.com \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).