* Re: rules matching ipv6 prefix addrs
2010-11-04 2:12 ` H. Peter Anvin
@ 2010-11-04 4:14 ` Patrick McHardy
2010-11-04 8:58 ` Jan Engelhardt
` (2 subsequent siblings)
3 siblings, 0 replies; 32+ messages in thread
From: Patrick McHardy @ 2010-11-04 4:14 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Jan Engelhardt, David Miller, pascal.mail, netfilter-devel
On 04.11.2010 03:12, H. Peter Anvin wrote:
> On 11/03/2010 06:52 PM, Jan Engelhardt wrote:
>>
>> I take it you mean a setup where addresses are automatically assigned
>> (DHCPv6, PPP).
>>
>
> DHCPv6, PPP, RA, anything. Keep in mind that "expect prefix changes" is
> a deliberate part of the IPv6 systems design.
Do we have a way to identify the prefix(es) in question for the ruleset?
IOW, do the userspace daemons replace the existing prefix or adds a new
one and removes the old one?
The kernel itself seems to make sure the autoconfigured local address
is always the first one on the interface. If userspace does the same
this should be pretty easy.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 2:12 ` H. Peter Anvin
2010-11-04 4:14 ` Patrick McHardy
@ 2010-11-04 8:58 ` Jan Engelhardt
2010-11-04 11:36 ` H. Peter Anvin
2010-11-04 11:08 ` Stephen Clark
2010-11-04 11:55 ` Pascal Hambourg
3 siblings, 1 reply; 32+ messages in thread
From: Jan Engelhardt @ 2010-11-04 8:58 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: David Miller, pascal.mail, netfilter-devel
On Thursday 2010-11-04 03:12, H. Peter Anvin wrote:
>
>Consider for example the case where I get from my ISP the netblock
>2001:0db8:ac10::/48. I subnet this internally with subnet numbers prefixed by
>/52 security domains, i.e 2001:0db8:ac10:0000::/52, 2001:0db8:ac10:1000::/52
>and so forth. Accordingly, my ip6tables would contain rules as to what kind of
>traffic can flow between these prefixes.
>
>Now, the upstream (ISP-assigned) prefix changes to 2001:6b2f:1705::/48. RA
>will handle reassigning addresses to actual downstream hosts, but things that
>explicitly encode IPv6 addresses need to be changed, and that includes
>ip6tables, in this case these rules now need to refer to
>2001:6b2f:1705:0000::/52, 2001:62bf:1705:1000::/52 and so on.
Now that helps, thanks :)
You could use
ip6tables -A FORWARD -d 0:0:0:1000::/0:0:0:ffff::
to ignore the changing prefix part.
>You're assuming (a) that I'm talking about a home gateway here (which may be,
>but is far from certain -- the dynamic prefixes are a design feature of the
>entire IPv6 Internet, and any entity that is not large enough to have direct
>access to BGP6 is required to handle arbitrary prefix changes),
I was just assuming this because I would find it highly disturbing if
my rented-servers-in-a-datacenter suddenly had their prefix changed,
for then that would also necessitate a change in the DNS zone.
If you self-host your own DNS zone to which the ISP has no write
access then goodluck.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 8:58 ` Jan Engelhardt
@ 2010-11-04 11:36 ` H. Peter Anvin
2010-11-04 11:53 ` Jan Engelhardt
2010-11-04 12:07 ` Pascal Hambourg
0 siblings, 2 replies; 32+ messages in thread
From: H. Peter Anvin @ 2010-11-04 11:36 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: David Miller, pascal.mail, netfilter-devel
Guess what... other services like DNS needs to deal with this too, and so far has not; this is part of what needs to happen before nontrivial scale IPv6 deployment happens...
"Jan Engelhardt" <jengelh@medozas.de> wrote:
>
>On Thursday 2010-11-04 03:12, H. Peter Anvin wrote:
>>
>>Consider for example the case where I get from my ISP the netblock
>>2001:0db8:ac10::/48. I subnet this internally with subnet numbers
>prefixed by
>>/52 security domains, i.e 2001:0db8:ac10:0000::/52,
>2001:0db8:ac10:1000::/52
>>and so forth. Accordingly, my ip6tables would contain rules as to
>what kind of
>>traffic can flow between these prefixes.
>>
>>Now, the upstream (ISP-assigned) prefix changes to
>2001:6b2f:1705::/48. RA
>>will handle reassigning addresses to actual downstream hosts, but
>things that
>>explicitly encode IPv6 addresses need to be changed, and that includes
>>ip6tables, in this case these rules now need to refer to
>>2001:6b2f:1705:0000::/52, 2001:62bf:1705:1000::/52 and so on.
>
>Now that helps, thanks :)
>
>You could use
>
> ip6tables -A FORWARD -d 0:0:0:1000::/0:0:0:ffff::
>
>to ignore the changing prefix part.
>
>>You're assuming (a) that I'm talking about a home gateway here (which
>may be,
>>but is far from certain -- the dynamic prefixes are a design feature
>of the
>>entire IPv6 Internet, and any entity that is not large enough to have
>direct
>>access to BGP6 is required to handle arbitrary prefix changes),
>
>I was just assuming this because I would find it highly disturbing if
>my rented-servers-in-a-datacenter suddenly had their prefix changed,
>for then that would also necessitate a change in the DNS zone.
>If you self-host your own DNS zone to which the ISP has no write
>access then goodluck.
--
Sent from my mobile phone. Please pardon any lack of formatting.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 11:36 ` H. Peter Anvin
@ 2010-11-04 11:53 ` Jan Engelhardt
2010-11-04 14:41 ` H. Peter Anvin
2010-11-04 12:07 ` Pascal Hambourg
1 sibling, 1 reply; 32+ messages in thread
From: Jan Engelhardt @ 2010-11-04 11:53 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: David Miller, pascal.mail, netfilter-devel
On Thursday 2010-11-04 12:36, H. Peter Anvin wrote:
>Guess what... other services like DNS needs to deal with this too, and
>so far has not; this is part of what needs to happen before nontrivial
>scale IPv6 deployment happens...
Despite what the RFCs say, IPv6 has big enough an address space that
static addresses (prefixes) are much more likely to be handed out.
Nevertheless, did you consider
>> ip6tables -A FORWARD -d 0:0:0:1000::/0:0:0:ffff::
>>
>>to ignore the changing prefix part.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 11:53 ` Jan Engelhardt
@ 2010-11-04 14:41 ` H. Peter Anvin
2010-11-04 20:02 ` Pascal Hambourg
0 siblings, 1 reply; 32+ messages in thread
From: H. Peter Anvin @ 2010-11-04 14:41 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: David Miller, pascal.mail, netfilter-devel
On 11/04/2010 07:53 AM, Jan Engelhardt wrote:
> On Thursday 2010-11-04 12:36, H. Peter Anvin wrote:
>
>> Guess what... other services like DNS needs to deal with this too, and
>> so far has not; this is part of what needs to happen before nontrivial
>> scale IPv6 deployment happens...
>
> Despite what the RFCs say, IPv6 has big enough an address space that
> static addresses (prefixes) are much more likely to be handed out.
>
Uhm... no. The reason we'll see dynamic prefixes isn't because of lack
of address space but because of mandatory route aggregation (which *is*
being implemented from the start) -- to keep BGP6 and the core routing
tables from melting down.
> Nevertheless, did you consider
>
>>> ip6tables -A FORWARD -d 0:0:0:1000::/0:0:0:ffff::
>>>
>>> to ignore the changing prefix part.
I did, but it means reducing the level of protection given; I'd consider
it an emergency hack.
-hpa
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 14:41 ` H. Peter Anvin
@ 2010-11-04 20:02 ` Pascal Hambourg
0 siblings, 0 replies; 32+ messages in thread
From: Pascal Hambourg @ 2010-11-04 20:02 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Jan Engelhardt, David Miller, netfilter-devel
H. Peter Anvin a écrit :
>
> Uhm... no. The reason we'll see dynamic prefixes isn't because of lack
> of address space but because of mandatory route aggregation (which *is*
> being implemented from the start) -- to keep BGP6 and the core routing
> tables from melting down.
Sorry to be a bit off-topic, but could you (or anyone) please explain
the relationship between dynamic prefixes and route aggregation ?
--
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
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 11:36 ` H. Peter Anvin
2010-11-04 11:53 ` Jan Engelhardt
@ 2010-11-04 12:07 ` Pascal Hambourg
1 sibling, 0 replies; 32+ messages in thread
From: Pascal Hambourg @ 2010-11-04 12:07 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Jan Engelhardt, David Miller, netfilter-devel
H. Peter Anvin a écrit :
> Guess what... other services like DNS needs to deal with this too,
> and so far has not; this is part of what needs to happen before nontrivial scale
> IPv6 deployment happens...
In this case, wouldn't a daemon listening for address changes and
managing all related operations such as ruleset or DNS updates, as
someone suggested in this thread, be a more generic approach ?
--
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
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 2:12 ` H. Peter Anvin
2010-11-04 4:14 ` Patrick McHardy
2010-11-04 8:58 ` Jan Engelhardt
@ 2010-11-04 11:08 ` Stephen Clark
2010-11-04 11:29 ` Pascal Hambourg
` (2 more replies)
2010-11-04 11:55 ` Pascal Hambourg
3 siblings, 3 replies; 32+ messages in thread
From: Stephen Clark @ 2010-11-04 11:08 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Jan Engelhardt, David Miller, pascal.mail, netfilter-devel
On 11/03/2010 10:12 PM, H. Peter Anvin wrote:
> On 11/03/2010 06:52 PM, Jan Engelhardt wrote:
>>
>> I take it you mean a setup where addresses are automatically assigned
>> (DHCPv6, PPP).
>>
>
> DHCPv6, PPP, RA, anything. Keep in mind that "expect prefix changes"
> is a deliberate part of the IPv6 systems design.
>
>> Still I don't see the problem - any security-conscious person would use
>> a drop-by-default ruleset. So a change of prefix address would, if
>> anything, cause packets to get dropped in FORWARD. (What do we have the
>> "ip6table_filter.forward" module option for? Right. And why is it set to
>> ACCEPT by default? *headshakethere*)
> >
>>> In IPv4 this is generally masked by NAT, but in IPv6 it affects every
>>> host.
>>
>> Different scenario. Because packets from Internet are
>> only destined for your home gateway address, they would get locally
>> delivered in the normal case, and any forwarding is an opt-in
>> process on the admin's behalf.
> >
>> If you used a FORWARD-DROP policy in IPv6, forwarding also becomes the
>> same opt-in process. So it's not like NAT would be any magic.
>> On Wednesday 2010-11-03 23:36, H. Peter Anvin wrote:
>
> Sorry this is nonsense. There is a huge difference -- with IPv6, the
> local prefix affect the addresses *on your internal network*, whereas
> with IPv4/NAT, they do not. In theory, IPv4 with dynamically assigned
> publically routable blocks would have the same problem, but in
> practice those simply do not exist.
>
> Consider for example the case where I get from my ISP the netblock
> 2001:0db8:ac10::/48. I subnet this internally with subnet numbers
> prefixed by /52 security domains, i.e 2001:0db8:ac10:0000::/52,
> 2001:0db8:ac10:1000::/52 and so forth. Accordingly, my ip6tables
> would contain rules as to what kind of traffic can flow between these
> prefixes.
>
> Now, the upstream (ISP-assigned) prefix changes to
> 2001:6b2f:1705::/48. RA will handle reassigning addresses to actual
> downstream hosts, but things that explicitly encode IPv6 addresses
> need to be changed, and that includes ip6tables, in this case these
> rules now need to refer to 2001:6b2f:1705:0000::/52,
> 2001:62bf:1705:1000::/52 and so on.
>
Won't this break existing tcp connections if all of a sudden you get a
new address?
>> Different scenario. Because packets from Internet are
>> only destined for your home gateway address, they would get locally
>> delivered in the normal case, and any forwarding is an opt-in
>> process on the admin's behalf.
>>
>> If you used a FORWARD-DROP policy in IPv6, forwarding also becomes the
>> same opt-in process. So it's not like NAT would be any magic.
>
> You're assuming (a) that I'm talking about a home gateway here (which
> may be, but is far from certain -- the dynamic prefixes are a design
> feature of the entire IPv6 Internet, and any entity that is not large
> enough to have direct access to BGP6 is required to handle arbitrary
> prefix changes), and (b) that I'm only concerned about entry/egress
> control, but this also affects internal control.
>
> -hpa
> --
> 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] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 11:08 ` Stephen Clark
@ 2010-11-04 11:29 ` Pascal Hambourg
2010-11-04 12:07 ` Stephen Clark
2010-11-04 13:34 ` Jozsef Kadlecsik
2010-11-04 14:41 ` H. Peter Anvin
2 siblings, 1 reply; 32+ messages in thread
From: Pascal Hambourg @ 2010-11-04 11:29 UTC (permalink / raw)
To: sclark46; +Cc: H. Peter Anvin, Jan Engelhardt, David Miller, netfilter-devel
Stephen Clark a écrit :
>
> Won't this break existing tcp connections if all of a sudden you get a
> new address?
Yes, but the same happened already with a variable IPv4 address, so this
is not a new problem. As I understand HPA, the new problem is that with
IPv6 the whole prefix can change.
--
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
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 11:29 ` Pascal Hambourg
@ 2010-11-04 12:07 ` Stephen Clark
2010-11-04 12:19 ` Pascal Hambourg
0 siblings, 1 reply; 32+ messages in thread
From: Stephen Clark @ 2010-11-04 12:07 UTC (permalink / raw)
To: Pascal Hambourg
Cc: H. Peter Anvin, Jan Engelhardt, David Miller, netfilter-devel
On 11/04/2010 07:29 AM, Pascal Hambourg wrote:
> Stephen Clark a écrit :
>
>> Won't this break existing tcp connections if all of a sudden you get a
>> new address?
>>
> Yes, but the same happened already with a variable IPv4 address, so this
> is not a new problem. As I understand HPA, the new problem is that with
> IPv6 the whole prefix can change.
>
>
Yes but when it happens there some kind of well defined event - like
dhcp giving you a new address
and can trigger scripts that do the necessary updating of whatever needs
to be updated. Also
I have a dynamic address that might change once or twice a year since I
leave my system on 24/7.
This sounds like all of a sudden the ISP gives you a new prefix and "RA"
(router advertisements ?)
let you know that you have a new address.
--
"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)
--
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
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 12:07 ` Stephen Clark
@ 2010-11-04 12:19 ` Pascal Hambourg
0 siblings, 0 replies; 32+ messages in thread
From: Pascal Hambourg @ 2010-11-04 12:19 UTC (permalink / raw)
To: sclark46; +Cc: H. Peter Anvin, Jan Engelhardt, David Miller, netfilter-devel
Stephen Clark a écrit :
> On 11/04/2010 07:29 AM, Pascal Hambourg wrote:
>> Stephen Clark a écrit :
>>
>>> Won't this break existing tcp connections if all of a sudden you get a
>>> new address?
>>>
>> Yes, but the same happened already with a variable IPv4 address, so this
>> is not a new problem. [...]
>>
> Yes but when it happens there some kind of well defined event - like
> dhcp giving you a new address
> and can trigger scripts that do the necessary updating of whatever needs
> to be updated.
Right, but that does not help much to deal with broken TCP connections.
--
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
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 11:08 ` Stephen Clark
2010-11-04 11:29 ` Pascal Hambourg
@ 2010-11-04 13:34 ` Jozsef Kadlecsik
2010-11-04 14:41 ` H. Peter Anvin
2 siblings, 0 replies; 32+ messages in thread
From: Jozsef Kadlecsik @ 2010-11-04 13:34 UTC (permalink / raw)
To: Stephen Clark
Cc: H. Peter Anvin, Jan Engelhardt, David Miller, pascal.mail,
netfilter-devel
On Thu, 4 Nov 2010, Stephen Clark wrote:
> > Consider for example the case where I get from my ISP the netblock
> > 2001:0db8:ac10::/48. I subnet this internally with subnet numbers prefixed
> > by /52 security domains, i.e 2001:0db8:ac10:0000::/52,
> > 2001:0db8:ac10:1000::/52 and so forth. Accordingly, my ip6tables would
> > contain rules as to what kind of traffic can flow between these prefixes.
> >
> > Now, the upstream (ISP-assigned) prefix changes to 2001:6b2f:1705::/48. RA
> > will handle reassigning addresses to actual downstream hosts, but things
> > that explicitly encode IPv6 addresses need to be changed, and that includes
> > ip6tables, in this case these rules now need to refer to
> > 2001:6b2f:1705:0000::/52, 2001:62bf:1705:1000::/52 and so on.
> >
> Won't this break existing tcp connections if all of a sudden you get a new
> address?
Actually, not: according to the IPv6 design, the old prefix and
address(es) should be kept until there's a single existing connection (and
the old addresses must not be assigned to new connections of course). That
gives a smooth path to change prefix anytime.
However, as others already expressed, that does not mean upstream should
change the prefix anytime. The whole process is to make possible to change
*ISP* anytime so the administrators are fully aware that there's a prefix
issue.
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlec@mail.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 11:08 ` Stephen Clark
2010-11-04 11:29 ` Pascal Hambourg
2010-11-04 13:34 ` Jozsef Kadlecsik
@ 2010-11-04 14:41 ` H. Peter Anvin
2010-11-04 17:35 ` Jeff Haran
2010-11-04 19:24 ` Jan Engelhardt
2 siblings, 2 replies; 32+ messages in thread
From: H. Peter Anvin @ 2010-11-04 14:41 UTC (permalink / raw)
To: sclark46; +Cc: Jan Engelhardt, David Miller, pascal.mail, netfilter-devel
On 11/04/2010 07:08 AM, Stephen Clark wrote:
>>
>> Now, the upstream (ISP-assigned) prefix changes to
>> 2001:6b2f:1705::/48. RA will handle reassigning addresses to actual
>> downstream hosts, but things that explicitly encode IPv6 addresses
>> need to be changed, and that includes ip6tables, in this case these
>> rules now need to refer to 2001:6b2f:1705:0000::/52,
>> 2001:62bf:1705:1000::/52 and so on.
>>
> Won't this break existing tcp connections if all of a sudden you get a
> new address?
>
Yes. Welcome to the brave new world of IPv6. One of many reasons why
IPv6 IMO is seriously misdesigned, but it's what we have and we no
longer have the time to do anything else.
-hpa
^ permalink raw reply [flat|nested] 32+ messages in thread
* RE: rules matching ipv6 prefix addrs
2010-11-04 14:41 ` H. Peter Anvin
@ 2010-11-04 17:35 ` Jeff Haran
2010-11-04 18:45 ` H. Peter Anvin
2010-11-04 19:24 ` Jan Engelhardt
1 sibling, 1 reply; 32+ messages in thread
From: Jeff Haran @ 2010-11-04 17:35 UTC (permalink / raw)
To: H. Peter Anvin, sclark46
Cc: Jan Engelhardt, David Miller, pascal.mail, netfilter-devel
> From: netfilter-devel-owner@vger.kernel.org
[mailto:netfilter-devel-owner@vger.kernel.org] On Behalf Of H. Peter
Anvin
>
> On 11/04/2010 07:08 AM, Stephen Clark wrote:
>>>
>>> Now, the upstream (ISP-assigned) prefix changes to
>>> 2001:6b2f:1705::/48. RA will handle reassigning addresses to actual
>>> downstream hosts, but things that explicitly encode IPv6 addresses
>>> need to be changed, and that includes ip6tables, in this case these
>>> rules now need to refer to 2001:6b2f:1705:0000::/52,
>>> 2001:62bf:1705:1000::/52 and so on.
>>>
>> Won't this break existing tcp connections if all of a sudden you get
a
>> new address?
>>
>
>Yes. Welcome to the brave new world of IPv6. One of many reasons why
>IPv6 IMO is seriously misdesigned, but it's what we have and we no
longer have the time to do anything else.
>
> -hpa
Ideally, your ISP wouldn't do this to you. Ideally, they would advertise
the new prefix as preferred and deprecate the old one. So connections
using the old prefix would continue to work while new connections should
start using the new prefix. By the time the old prefix is invalid there
should be no TCP connections using it since most TCP connections don't
last as long as the valid lifetime. But since TCP doesn't define a
maximum connection duration, it's still a possibility that long lived
connections could be dropped, no matter how hard the ISP tries to
prevent it. But it does mean that any reasonable IPv6 firewall setup
should deal with multiple prefixes. And it also means that if you have
an application that won't well tolerate dropped connections, you should
probably code it to do a clean close and restart whenever the address at
your end of the socket transitions from preferred to deprecated state.
Jeff Haran
Bytemobile
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 17:35 ` Jeff Haran
@ 2010-11-04 18:45 ` H. Peter Anvin
0 siblings, 0 replies; 32+ messages in thread
From: H. Peter Anvin @ 2010-11-04 18:45 UTC (permalink / raw)
To: Jeff Haran
Cc: sclark46, Jan Engelhardt, David Miller, pascal.mail,
netfilter-devel
On 11/04/2010 01:35 PM, Jeff Haran wrote:
>
> Ideally, your ISP wouldn't do this to you. Ideally, they would advertise
> the new prefix as preferred and deprecate the old one. So connections
> using the old prefix would continue to work while new connections should
> start using the new prefix. By the time the old prefix is invalid there
> should be no TCP connections using it since most TCP connections don't
> last as long as the valid lifetime. But since TCP doesn't define a
> maximum connection duration, it's still a possibility that long lived
> connections could be dropped, no matter how hard the ISP tries to
> prevent it. But it does mean that any reasonable IPv6 firewall setup
> should deal with multiple prefixes. And it also means that if you have
> an application that won't well tolerate dropped connections, you should
> probably code it to do a clean close and restart whenever the address at
> your end of the socket transitions from preferred to deprecated state.
>
Ideally, yes, although I don't realistically believe that will happen.
Now, to deal with multiple prefixes in parallel is even more complex
than switching prefixes.
There is obviously no such thing as a maximum TCP duration, and therein
lies a huge problem; the only way to deal with it sanely would have been
to separate routing from endpoint identity, but the IPv6 architects
chose to not go that route, partly because they seriously misestimated
the timescale of the transition.
-hpa
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 14:41 ` H. Peter Anvin
2010-11-04 17:35 ` Jeff Haran
@ 2010-11-04 19:24 ` Jan Engelhardt
2010-11-04 19:26 ` H. Peter Anvin
1 sibling, 1 reply; 32+ messages in thread
From: Jan Engelhardt @ 2010-11-04 19:24 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: sclark46, David Miller, pascal.mail, netfilter-devel
On Thursday 2010-11-04 15:41, H. Peter Anvin wrote:
> On 11/04/2010 07:08 AM, Stephen Clark wrote:
>>>
>>> Now, the upstream (ISP-assigned) prefix changes to
>>> 2001:6b2f:1705::/48. RA will handle reassigning addresses to actual
>>> downstream hosts, but things that explicitly encode IPv6 addresses
>>> need to be changed, and that includes ip6tables, in this case these
>>> rules now need to refer to 2001:6b2f:1705:0000::/52,
>>> 2001:62bf:1705:1000::/52 and so on.
>>>
>> Won't this break existing tcp connections if all of a sudden you get a
>> new address?
>
>Yes. Welcome to the brave new world of IPv6. One of many reasons why IPv6 IMO
>is seriously misdesigned, but it's what we have and we no longer have the time
>to do anything else.
Well we know academia is evil as they never talk to us on linux-netdev
when designing protocols behind closed doors.
One could also argue that IPv6 just does what it does, and that any
extra feature is layered... what you want sounds like Shim6.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 19:24 ` Jan Engelhardt
@ 2010-11-04 19:26 ` H. Peter Anvin
0 siblings, 0 replies; 32+ messages in thread
From: H. Peter Anvin @ 2010-11-04 19:26 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: sclark46, David Miller, pascal.mail, netfilter-devel
On 11/04/2010 03:24 PM, Jan Engelhardt wrote:
>
> On Thursday 2010-11-04 15:41, H. Peter Anvin wrote:
>> On 11/04/2010 07:08 AM, Stephen Clark wrote:
>>>>
>>>> Now, the upstream (ISP-assigned) prefix changes to
>>>> 2001:6b2f:1705::/48. RA will handle reassigning addresses to actual
>>>> downstream hosts, but things that explicitly encode IPv6 addresses
>>>> need to be changed, and that includes ip6tables, in this case these
>>>> rules now need to refer to 2001:6b2f:1705:0000::/52,
>>>> 2001:62bf:1705:1000::/52 and so on.
>>>>
>>> Won't this break existing tcp connections if all of a sudden you get a
>>> new address?
>>
>> Yes. Welcome to the brave new world of IPv6. One of many reasons why IPv6 IMO
>> is seriously misdesigned, but it's what we have and we no longer have the time
>> to do anything else.
>
> Well we know academia is evil as they never talk to us on linux-netdev
> when designing protocols behind closed doors.
>
> One could also argue that IPv6 just does what it does, and that any
> extra feature is layered... what you want sounds like Shim6.
Or Mobile IPv6 or whatever... however, it's unlikely that whatever
solution is going to be universal.
-hpa
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 2:12 ` H. Peter Anvin
` (2 preceding siblings ...)
2010-11-04 11:08 ` Stephen Clark
@ 2010-11-04 11:55 ` Pascal Hambourg
2010-11-04 14:42 ` H. Peter Anvin
3 siblings, 1 reply; 32+ messages in thread
From: Pascal Hambourg @ 2010-11-04 11:55 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Jan Engelhardt, David Miller, netfilter-devel
H. Peter Anvin a écrit :
> On 11/03/2010 06:52 PM, Jan Engelhardt wrote:
>> I take it you mean a setup where addresses are automatically assigned
>> (DHCPv6, PPP).
6to4 with the prefix based on a variable IPv4 address, fail-over setup
using links with different prefixes...
> DHCPv6, PPP, RA, anything.
AFAIK PPP only assigns the IPv6 link local addresses so it is not an
issue, and the global prefix must be configured by other means such as
DHCPv6.
> Keep in mind that "expect prefix changes" is
> a deliberate part of the IPv6 systems design.
I have been using IPv6 for a few years now, and was not aware this was a
design feature. I know two ISPs here that provide IPv6, both assign a
fixed prefix. Also AFAIK IPv6 tunnel brokers assign fixed prefixes. In
my mind, "dynamic" does not necessarily mean "variable".
> Consider for example the case where I get from my ISP the netblock
> 2001:0db8:ac10::/48. I subnet this internally with subnet numbers
> prefixed by /52 security domains, i.e 2001:0db8:ac10:0000::/52,
> 2001:0db8:ac10:1000::/52 and so forth.
/52 is quite unusual. AFAIK stateless autoconfiguration requires a
prefix length of /64.
> Accordingly, my ip6tables would
> contain rules as to what kind of traffic can flow between these prefixes.
>
> Now, the upstream (ISP-assigned) prefix changes to 2001:6b2f:1705::/48.
> RA will handle reassigning addresses to actual downstream hosts, but
> things that explicitly encode IPv6 addresses need to be changed, and
> that includes ip6tables, in this case these rules now need to refer to
> 2001:6b2f:1705:0000::/52, 2001:62bf:1705:1000::/52 and so on.
Are you talking about rules on the router which subnets the block, or on
downstream hosts ?
Also, is each subnet prefix on a separate link ?
Could you provide an example of such rules ?
--
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
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 11:55 ` Pascal Hambourg
@ 2010-11-04 14:42 ` H. Peter Anvin
2010-11-04 20:00 ` Pascal Hambourg
0 siblings, 1 reply; 32+ messages in thread
From: H. Peter Anvin @ 2010-11-04 14:42 UTC (permalink / raw)
To: Pascal Hambourg; +Cc: Jan Engelhardt, David Miller, netfilter-devel
On 11/04/2010 07:55 AM, Pascal Hambourg wrote:
>
>> Consider for example the case where I get from my ISP the netblock
>> 2001:0db8:ac10::/48. I subnet this internally with subnet numbers
>> prefixed by /52 security domains, i.e 2001:0db8:ac10:0000::/52,
>> 2001:0db8:ac10:1000::/52 and so forth.
>
> /52 is quite unusual. AFAIK stateless autoconfiguration requires a
> prefix length of /64.
>
The implication in the example is that the /52 security domains each
contain a number of /64 subnets.
>> Accordingly, my ip6tables would
>> contain rules as to what kind of traffic can flow between these prefixes.
>>
>> Now, the upstream (ISP-assigned) prefix changes to 2001:6b2f:1705::/48.
>> RA will handle reassigning addresses to actual downstream hosts, but
>> things that explicitly encode IPv6 addresses need to be changed, and
>> that includes ip6tables, in this case these rules now need to refer to
>> 2001:6b2f:1705:0000::/52, 2001:62bf:1705:1000::/52 and so on.
>
> Are you talking about rules on the router which subnets the block, or on
> downstream hosts ?
> Also, is each subnet prefix on a separate link ?
> Could you provide an example of such rules ?
I'm talking about rules on the internal router(s) which separate the
security domains. I can probably come up with a concrete ruleset, but
it'll take a few days since I'm travelling at the moment.
-hpa
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: rules matching ipv6 prefix addrs
2010-11-04 14:42 ` H. Peter Anvin
@ 2010-11-04 20:00 ` Pascal Hambourg
0 siblings, 0 replies; 32+ messages in thread
From: Pascal Hambourg @ 2010-11-04 20:00 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Jan Engelhardt, David Miller, netfilter-devel
H. Peter Anvin a écrit :
>>>
>>> Now, the upstream (ISP-assigned) prefix changes to 2001:6b2f:1705::/48.
>>> RA will handle reassigning addresses to actual downstream hosts, but
>>> things that explicitly encode IPv6 addresses need to be changed, and
>>> that includes ip6tables, in this case these rules now need to refer to
>>> 2001:6b2f:1705:0000::/52, 2001:62bf:1705:1000::/52 and so on.
>>
>> Are you talking about rules on the router which subnets the block, or on
>> downstream hosts ?
>> Also, is each subnet prefix on a separate link ?
>> Could you provide an example of such rules ?
>
> I'm talking about rules on the internal router(s) which separate the
> security domains.
Isn't it enough to match the input and/or output interface(s) ?
> I can probably come up with a concrete ruleset, but
> it'll take a few days since I'm travelling at the moment.
I am not asking for a complete ruleset, rather a few sample rules and
their purpose.
--
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
^ permalink raw reply [flat|nested] 32+ messages in thread