public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* IPv6 Privacy Extension support?
@ 2024-03-01 14:46 Hannes von Haugwitz
  2024-03-04 12:30 ` James Prestwood
  0 siblings, 1 reply; 9+ messages in thread
From: Hannes von Haugwitz @ 2024-03-01 14:46 UTC (permalink / raw)
  To: iwd

Hello,

I'm running Debian sid and iwd 2.15.

When I enable network configuration and IPv6 in iwd config, the IPv6
address contains the embedded interface identifier (i.e. the MAC
address), even though IPv6 Privacy Extension is enabled for the device
(net.ipv6.conf.wlan0.use_tempaddr = 2).

Do I miss something or is there no support for IPv6 Privacy Extension
in iwd?

Best regards

Hannes

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6 Privacy Extension support?
  2024-03-01 14:46 IPv6 Privacy Extension support? Hannes von Haugwitz
@ 2024-03-04 12:30 ` James Prestwood
  2024-03-04 19:32   ` Hannes von Haugwitz
  0 siblings, 1 reply; 9+ messages in thread
From: James Prestwood @ 2024-03-04 12:30 UTC (permalink / raw)
  To: Hannes von Haugwitz, iwd

Hi Hannes,

On 3/1/24 6:46 AM, Hannes von Haugwitz wrote:
> Hello,
>
> I'm running Debian sid and iwd 2.15.
>
> When I enable network configuration and IPv6 in iwd config, the IPv6
> address contains the embedded interface identifier (i.e. the MAC
> address), even though IPv6 Privacy Extension is enabled for the device
> (net.ipv6.conf.wlan0.use_tempaddr = 2).
>
> Do I miss something or is there no support for IPv6 Privacy Extension
> in iwd?

I'm not familiar with the privacy extensions specifically, but you can 
enable MAC address randomization which should hide the MAC for you. You 
can check the man pages for more details but in main.conf something like:

[Settings]
AddressRandomization=network
>
> Best regards
>
> Hannes
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6 Privacy Extension support?
  2024-03-04 12:30 ` James Prestwood
@ 2024-03-04 19:32   ` Hannes von Haugwitz
  2024-03-04 21:40     ` Grant Erickson
  0 siblings, 1 reply; 9+ messages in thread
From: Hannes von Haugwitz @ 2024-03-04 19:32 UTC (permalink / raw)
  To: James Prestwood; +Cc: iwd

Hi,

On Mon, Mar 04, 2024 at 04:30:27AM -0800, James Prestwood wrote:
> I'm not familiar with the privacy extensions specifically, but you can
> enable MAC address randomization which should hide the MAC for you. You can
> check the man pages for more details but in main.conf something like:
> 
> [Settings]
> AddressRandomization=network

MAC address randomization hides the physical MAC address but does not
prevent device tracking (within the same network). With privacy extension
enabled, the IPv6 address is randomly regenerated every few hours.

For more details see [RFC_4941].

Best regards

Hannes

[RFC_4941] https://www.rfc-editor.org/rfc/rfc4941

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6 Privacy Extension support?
  2024-03-04 19:32   ` Hannes von Haugwitz
@ 2024-03-04 21:40     ` Grant Erickson
  2024-03-06 12:19       ` James Prestwood
  0 siblings, 1 reply; 9+ messages in thread
From: Grant Erickson @ 2024-03-04 21:40 UTC (permalink / raw)
  To: James Prestwood; +Cc: Hannes von Haugwitz, iwd

On Mar 4, 2024, at 11:32 AM, Hannes von Haugwitz <hannes@vonhaugwitz.com> wrote:
> On Mon, Mar 04, 2024 at 04:30:27AM -0800, James Prestwood wrote:
>> I'm not familiar with the privacy extensions specifically, but you can
>> enable MAC address randomization which should hide the MAC for you. You can
>> check the man pages for more details but in main.conf something like:
>> 
>> [Settings]
>> AddressRandomization=network
> 
> MAC address randomization hides the physical MAC address but does not
> prevent device tracking (within the same network). With privacy extension
> enabled, the IPv6 address is randomly regenerated every few hours.
> 
> For more details see [RFC_4941].
> 
> Best regards
> 
> Hannes

James:

I believe it’s handled in connman with these APIs:

    https://git.kernel.org/pub/scm/network/connman/connman.git/tree/src/ipconfig.c#n528

with the Linux kernel “use_tempaddr” sysctl setting. I assume iwd would have to replicate this infrastructure, or pull it into ELL and share it that way.

Best,

Grant

-- 
Principal
Nuovations

gerickson@nuovations.com
http://www.nuovations.com/


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6 Privacy Extension support?
  2024-03-04 21:40     ` Grant Erickson
@ 2024-03-06 12:19       ` James Prestwood
  2024-08-04 21:01         ` Hannes von Haugwitz
  0 siblings, 1 reply; 9+ messages in thread
From: James Prestwood @ 2024-03-06 12:19 UTC (permalink / raw)
  To: Grant Erickson; +Cc: Hannes von Haugwitz, iwd

Hi,

On 3/4/24 1:40 PM, Grant Erickson wrote:
> On Mar 4, 2024, at 11:32 AM, Hannes von Haugwitz <hannes@vonhaugwitz.com> wrote:
>> On Mon, Mar 04, 2024 at 04:30:27AM -0800, James Prestwood wrote:
>>> I'm not familiar with the privacy extensions specifically, but you can
>>> enable MAC address randomization which should hide the MAC for you. You can
>>> check the man pages for more details but in main.conf something like:
>>>
>>> [Settings]
>>> AddressRandomization=network
>> MAC address randomization hides the physical MAC address but does not
>> prevent device tracking (within the same network). With privacy extension
>> enabled, the IPv6 address is randomly regenerated every few hours.
>>
>> For more details see [RFC_4941].
>>
>> Best regards
>>
>> Hannes
> James:
>
> I believe it’s handled in connman with these APIs:
>
>      https://git.kernel.org/pub/scm/network/connman/connman.git/tree/src/ipconfig.c#n528
>
> with the Linux kernel “use_tempaddr” sysctl setting. I assume iwd would have to replicate this infrastructure, or pull it into ELL and share it that way.

Hmm, if this is all that's required then shouldn't this already work if 
Hannes is setting "use_tempaddr" externally to IWD? Of course having 
this within an IWD profile setting would be nice, but I think there must 
be more too it than this right?

Thanks,

James

> Best,
>
> Grant
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6 Privacy Extension support?
  2024-03-06 12:19       ` James Prestwood
@ 2024-08-04 21:01         ` Hannes von Haugwitz
  2024-08-05 12:44           ` James Prestwood
  0 siblings, 1 reply; 9+ messages in thread
From: Hannes von Haugwitz @ 2024-08-04 21:01 UTC (permalink / raw)
  To: James Prestwood; +Cc: Grant Erickson, iwd

On Wed, Mar 06, 2024 at 04:19:41AM -0800, James Prestwood wrote:
> On 3/4/24 1:40 PM, Grant Erickson wrote:
> > On Mar 4, 2024, at 11:32 AM, Hannes von Haugwitz <hannes@vonhaugwitz.com> wrote:
> > > On Mon, Mar 04, 2024 at 04:30:27AM -0800, James Prestwood wrote:
> > > > I'm not familiar with the privacy extensions specifically, but you can
> > > > enable MAC address randomization which should hide the MAC for you. You can
> > > > check the man pages for more details but in main.conf something like:
> > > >
> > > > [Settings]
> > > > AddressRandomization=network
> > > MAC address randomization hides the physical MAC address but does not
> > > prevent device tracking (within the same network). With privacy extension
> > > enabled, the IPv6 address is randomly regenerated every few hours.
> > >
> > > For more details see [RFC_4941].
> > >
> > > Best regards
> > >
> > > Hannes
> > James:
> >
> > I believe it’s handled in connman with these APIs:
> >
> >      https://git.kernel.org/pub/scm/network/connman/connman.git/tree/src/ipconfig.c#n528
> >
> > with the Linux kernel “use_tempaddr” sysctl setting. I assume iwd would have to replicate this infrastructure, or pull it into ELL and share it that way.
>
> Hmm, if this is all that's required then shouldn't this already work if
> Hannes is setting "use_tempaddr" externally to IWD? Of course having this
> within an IWD profile setting would be nice, but I think there must be more
> too it than this right?

Is there any news about this feature request?

Best regards

Hannes

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6 Privacy Extension support?
  2024-08-04 21:01         ` Hannes von Haugwitz
@ 2024-08-05 12:44           ` James Prestwood
  2024-08-06 17:38             ` Hannes von Haugwitz
  2024-08-09 17:54             ` Hannes von Haugwitz
  0 siblings, 2 replies; 9+ messages in thread
From: James Prestwood @ 2024-08-05 12:44 UTC (permalink / raw)
  To: Hannes von Haugwitz; +Cc: Grant Erickson, iwd

Hi Hannes,

On 8/4/24 2:01 PM, Hannes von Haugwitz wrote:
> On Wed, Mar 06, 2024 at 04:19:41AM -0800, James Prestwood wrote:
>> On 3/4/24 1:40 PM, Grant Erickson wrote:
>>> On Mar 4, 2024, at 11:32 AM, Hannes von Haugwitz <hannes@vonhaugwitz.com> wrote:
>>>> On Mon, Mar 04, 2024 at 04:30:27AM -0800, James Prestwood wrote:
>>>>> I'm not familiar with the privacy extensions specifically, but you can
>>>>> enable MAC address randomization which should hide the MAC for you. You can
>>>>> check the man pages for more details but in main.conf something like:
>>>>>
>>>>> [Settings]
>>>>> AddressRandomization=network
>>>> MAC address randomization hides the physical MAC address but does not
>>>> prevent device tracking (within the same network). With privacy extension
>>>> enabled, the IPv6 address is randomly regenerated every few hours.
>>>>
>>>> For more details see [RFC_4941].
>>>>
>>>> Best regards
>>>>
>>>> Hannes
>>> James:
>>>
>>> I believe it’s handled in connman with these APIs:
>>>
>>>       https://git.kernel.org/pub/scm/network/connman/connman.git/tree/src/ipconfig.c#n528
>>>
>>> with the Linux kernel “use_tempaddr” sysctl setting. I assume iwd would have to replicate this infrastructure, or pull it into ELL and share it that way.
>> Hmm, if this is all that's required then shouldn't this already work if
>> Hannes is setting "use_tempaddr" externally to IWD? Of course having this
>> within an IWD profile setting would be nice, but I think there must be more
>> too it than this right?
> Is there any news about this feature request?

I was still not sure exactly what needs to be done. If the sysctl 
setting is all thats needed, this is an easy feature, but you had said 
setting that manually still doesn't enable the privacy extensions? Is 
the issue maybe that IWD removes the wlan0 interface on startup? So 
setting that sysctl setting manually, then starting IWD, is clearing it?

Is use_tempaddr still set as expected after IWD start?

Thanks,

James

>
> Best regards
>
> Hannes

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6 Privacy Extension support?
  2024-08-05 12:44           ` James Prestwood
@ 2024-08-06 17:38             ` Hannes von Haugwitz
  2024-08-09 17:54             ` Hannes von Haugwitz
  1 sibling, 0 replies; 9+ messages in thread
From: Hannes von Haugwitz @ 2024-08-06 17:38 UTC (permalink / raw)
  To: James Prestwood; +Cc: Grant Erickson, iwd

On Mon, Aug 05, 2024 at 05:44:39AM -0700, James Prestwood wrote:
> I was still not sure exactly what needs to be done. If the sysctl setting is
> all thats needed, this is an easy feature, but you had said setting that
> manually still doesn't enable the privacy extensions? Is the issue maybe
> that IWD removes the wlan0 interface on startup? So setting that sysctl
> setting manually, then starting IWD, is clearing it?
> 
> Is use_tempaddr still set as expected after IWD start?

I set the following kernel parameters via sysctl.d/60-ipv6_privacy.conf:

net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2

After restarting IWD use_tempaddr for wlan0 is set as expected:

# sysctl net.ipv6.conf.wlan0.use_tempaddr
net.ipv6.conf.wlan0.use_tempaddr = 2

Best regards

Hannes

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: IPv6 Privacy Extension support?
  2024-08-05 12:44           ` James Prestwood
  2024-08-06 17:38             ` Hannes von Haugwitz
@ 2024-08-09 17:54             ` Hannes von Haugwitz
  1 sibling, 0 replies; 9+ messages in thread
From: Hannes von Haugwitz @ 2024-08-09 17:54 UTC (permalink / raw)
  To: James Prestwood; +Cc: Grant Erickson, iwd

Hi James,

On Mon, Aug 05, 2024 at 05:44:39AM -0700, James Prestwood wrote:
> I was still not sure exactly what needs to be done. If the sysctl setting is
> all thats needed, this is an easy feature, but you had said setting that
> manually still doesn't enable the privacy extensions? Is the issue maybe
> that IWD removes the wlan0 interface on startup? So setting that sysctl
> setting manually, then starting IWD, is clearing it?

I've looked a bit deeper into the source code. It looks like iwd uses
the ell library for network configuration and ell seems to hard code the
EUI-64-based Interface Identifier for the IPv6 address[ell/netconfig.c].

Best regards

Hannes

[ell/netconfig.c] https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ell/netconfig.c?id=4acbb92c0513644900078c348d972ef5e48fdc4c#n760

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-08-09 17:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-01 14:46 IPv6 Privacy Extension support? Hannes von Haugwitz
2024-03-04 12:30 ` James Prestwood
2024-03-04 19:32   ` Hannes von Haugwitz
2024-03-04 21:40     ` Grant Erickson
2024-03-06 12:19       ` James Prestwood
2024-08-04 21:01         ` Hannes von Haugwitz
2024-08-05 12:44           ` James Prestwood
2024-08-06 17:38             ` Hannes von Haugwitz
2024-08-09 17:54             ` Hannes von Haugwitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox