* Re: ip6tables breaks dnssec?
2011-04-27 11:22 ` Jan Engelhardt
@ 2011-04-27 11:41 ` Leo Baltus
2011-05-06 14:05 ` Leo Baltus
2011-04-27 11:43 ` Ulrich Weber
2011-04-27 12:54 ` Stephen Clark
2 siblings, 1 reply; 10+ messages in thread
From: Leo Baltus @ 2011-04-27 11:41 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Ulrich Weber, netfilter-devel
Op 27/04/2011 om 13:22:57 +0200, schreef Jan Engelhardt:
> On Wednesday 2011-04-27 12:43, Ulrich Weber wrote:
>
> >Each fragmented IPv6 packets will traverse netfilter separately,
> >in contrast to IPv4, where its only one refragmented packet.
>
> Not really. All fragments enter nf_hook_slow, be it IPv4 or IPv6.
> It's just that nf_defrag - which is a netfilter module - collects and
> suppresses fragments before spitting out the unfragmented one.
>
> >"ip6tables -A INPUT -j ACCEPT -p udp --dport 53" will only match the
> >first fragment, where the UDP header can be found. To match the
> >additional fragments, you have to insert these rules:
> >
> >ip6tables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
> >ip6tables -I OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
>
> That will load nf_conntrack_ipv6, and because conntrack depends on
> nf_defrag_ipv6, will load that too. Once it is loaded, packets should
> be defragmented independetly of whether you actually use -m conntrack
> (or the obsolete -m state) or not.
my /proc/config.gs says:
CONFIG_NF_CONNTRACK_IPV6=y
so it is already loaded
But is does not defrag.
Also I am a bit worried about using conntrack because of the high
volume dns queries tend to be which would generate a very large
connectiontracking table and/or system load.
--
Leo Baltus, internetbeheerder /\
NPO ICT Internet Services /NPO/\
Sumatralaan 45, 1217 GP Hilversum, Filmcentrum, west \ /\/
beheer@omroep.nl, 035-6773555 \/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ip6tables breaks dnssec?
2011-04-27 11:41 ` Leo Baltus
@ 2011-05-06 14:05 ` Leo Baltus
0 siblings, 0 replies; 10+ messages in thread
From: Leo Baltus @ 2011-05-06 14:05 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Ulrich Weber, netfilter-devel
Op 27/04/2011 om 13:41:39 +0200, schreef Leo Baltus:
> Op 27/04/2011 om 13:22:57 +0200, schreef Jan Engelhardt:
> > On Wednesday 2011-04-27 12:43, Ulrich Weber wrote:
> >
> > >Each fragmented IPv6 packets will traverse netfilter separately,
> > >in contrast to IPv4, where its only one refragmented packet.
> >
> > Not really. All fragments enter nf_hook_slow, be it IPv4 or IPv6.
> > It's just that nf_defrag - which is a netfilter module - collects and
> > suppresses fragments before spitting out the unfragmented one.
> >
> > >"ip6tables -A INPUT -j ACCEPT -p udp --dport 53" will only match the
> > >first fragment, where the UDP header can be found. To match the
> > >additional fragments, you have to insert these rules:
> > >
> > >ip6tables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
> > >ip6tables -I OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
> >
> > That will load nf_conntrack_ipv6, and because conntrack depends on
> > nf_defrag_ipv6, will load that too. Once it is loaded, packets should
> > be defragmented independetly of whether you actually use -m conntrack
> > (or the obsolete -m state) or not.
>
> my /proc/config.gs says:
> CONFIG_NF_CONNTRACK_IPV6=y
> so it is already loaded
>
> But is does not defrag.
>
So is this a bug? Given the state ip6tables is now in the only way to
make defrag work is to set '--state RELATED,ESTABLISHED'. As I
understand it, this should not be the case, right?
> Also I am a bit worried about using conntrack because of the high
> volume dns queries tend to be which would generate a very large
> connectiontracking table and/or system load.
>
I am not sure if this is true or not for fragments, but for heavy tcp
traffic (http) we use raw/NOTRACK to avoid conntrack, how would that work
with ip6tables considering heavy fragmented (http or dns) traffic?
--
Leo Baltus, internetbeheerder /\
NPO ICT Internet Services /NPO/\
Sumatralaan 45, 1217 GP Hilversum, Filmcentrum, west \ /\/
beheer@omroep.nl, 035-6773555 \/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ip6tables breaks dnssec?
2011-04-27 11:22 ` Jan Engelhardt
2011-04-27 11:41 ` Leo Baltus
@ 2011-04-27 11:43 ` Ulrich Weber
2011-04-27 12:54 ` Stephen Clark
2 siblings, 0 replies; 10+ messages in thread
From: Ulrich Weber @ 2011-04-27 11:43 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Ulrich Weber, Leo Baltus, netfilter-devel
On 04/27/2011 01:22 PM, Jan Engelhardt wrote:
> On Wednesday 2011-04-27 12:43, Ulrich Weber wrote:
>
>> Each fragmented IPv6 packets will traverse netfilter separately,
>> in contrast to IPv4, where its only one refragmented packet.
>
> Not really. All fragments enter nf_hook_slow, be it IPv4 or IPv6.
> It's just that nf_defrag - which is a netfilter module - collects and
> suppresses fragments before spitting out the unfragmented one.
nf_ct_frag6_output() sends each fragment itself through netfilter.
Personally I don't like this and would rather see, that IPv6 behaves the
same way as IPv4, sending the unfragmented packet through netfilter...
Cheers
Ulrich
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ip6tables breaks dnssec?
2011-04-27 11:22 ` Jan Engelhardt
2011-04-27 11:41 ` Leo Baltus
2011-04-27 11:43 ` Ulrich Weber
@ 2011-04-27 12:54 ` Stephen Clark
2011-04-27 13:01 ` Jan Engelhardt
2 siblings, 1 reply; 10+ messages in thread
From: Stephen Clark @ 2011-04-27 12:54 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Ulrich Weber, Leo Baltus, netfilter-devel
On 04/27/2011 07:22 AM, Jan Engelhardt wrote:
> On Wednesday 2011-04-27 12:43, Ulrich Weber wrote:
>
>
>> Each fragmented IPv6 packets will traverse netfilter separately,
>> in contrast to IPv4, where its only one refragmented packet.
>>
> Not really. All fragments enter nf_hook_slow, be it IPv4 or IPv6.
> It's just that nf_defrag - which is a netfilter module - collects and
> suppresses fragments before spitting out the unfragmented one.
>
>
>> "ip6tables -A INPUT -j ACCEPT -p udp --dport 53" will only match the
>> first fragment, where the UDP header can be found. To match the
>> additional fragments, you have to insert these rules:
>>
>> ip6tables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
>> ip6tables -I OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
>>
> That will load nf_conntrack_ipv6, and because conntrack depends on
> nf_defrag_ipv6, will load that too. Once it is loaded, packets should
> be defragmented independetly of whether you actually use -m conntrack
> (or the obsolete -m state) or not.
>
Jan,
are you saying we should be using -m conntrack now instead of -m state
and that -m state is going away?
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
--
"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety." (Ben Franklin)
"The course of history shows that as a government grows, liberty
decreases." (Thomas Jefferson)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ip6tables breaks dnssec?
2011-04-27 12:54 ` Stephen Clark
@ 2011-04-27 13:01 ` Jan Engelhardt
0 siblings, 0 replies; 10+ messages in thread
From: Jan Engelhardt @ 2011-04-27 13:01 UTC (permalink / raw)
To: Stephen Clark; +Cc: Ulrich Weber, Leo Baltus, netfilter-devel
On Wednesday 2011-04-27 14:54, Stephen Clark wrote:
> On 04/27/2011 07:22 AM, Jan Engelhardt wrote:
>> On Wednesday 2011-04-27 12:43, Ulrich Weber wrote:
>>
>>
>>> Each fragmented IPv6 packets will traverse netfilter separately,
>>> in contrast to IPv4, where its only one refragmented packet.
>>>
>> Not really. All fragments enter nf_hook_slow, be it IPv4 or IPv6.
>> It's just that nf_defrag - which is a netfilter module - collects and
>> suppresses fragments before spitting out the unfragmented one.
>>
>>
>>> "ip6tables -A INPUT -j ACCEPT -p udp --dport 53" will only match the
>>> first fragment, where the UDP header can be found. To match the
>>> additional fragments, you have to insert these rules:
>>>
>>> ip6tables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
>>> ip6tables -I OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
>>>
>> That will load nf_conntrack_ipv6, and because conntrack depends on
>> nf_defrag_ipv6, will load that too. Once it is loaded, packets should
>> be defragmented independetly of whether you actually use -m conntrack
>> (or the obsolete -m state) or not.
>>
> Jan,
>
> are you saying we should be using -m conntrack now instead of -m state and that
> -m state is going away?
-m state is old, redundant (since at least 2.6.12..), - and as such
ignored whenever possible - but others think removing xt_state is too
much a message to people..
^ permalink raw reply [flat|nested] 10+ messages in thread