Skip to contentSkip to conversation

IPv6 Privacy Extension support?

DISCUSSION Hannes von Haugwitz 3 participants 9 messages Mar 1, 2024 – Aug 9, 2024

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Hi Hannes,

Quoted 11 lines · Hannes von Haugwitz

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

Quoted 5 lines

Best regards

Hannes

#2 lore raw

Hi,

Quoted 6 lines · James Prestwood

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

#3 lore raw
Quoted 12 lines · Hannes von Haugwitz
Quoted 6 lines · James Prestwood

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.

Quoted 5 lines

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

Signature · 5 lines
Principal
Nuovations

[email protected]
http://www.nuovations.com/
#4 lore raw

Hi,

Quoted 16 lines · Grant Erickson
Quoted 15 lines · Hannes von Haugwitz
Quoted 6 lines · James Prestwood

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

Quoted 8 lines
Quoted 1 line

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

Quoted 4 lines

Best,

Grant

#5 lore raw
Quoted 22 lines · James Prestwood
Quoted 21 lines · Grant Erickson
Quoted 11 lines · Hannes von Haugwitz
Quoted 6 lines · James Prestwood

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.

Quoted 5 lines

For more details see [RFC_4941].

Best regards

Hannes

James:

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

Quoted 8 lines
Quoted 3 lines

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

#6 lore raw

Hi Hannes,

Quoted 23 lines · Hannes von Haugwitz
Quoted 22 lines · James Prestwood
Quoted 21 lines · Grant Erickson
Quoted 11 lines · Hannes von Haugwitz
Quoted 6 lines · James Prestwood

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.

Quoted 5 lines

For more details see [RFC_4941].

Best regards

Hannes

James:

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

Quoted 8 lines
Quoted 7 lines
Quoted 3 lines

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

Quoted 4 lines

Best regards

Hannes

#7 lore raw
Quoted 7 lines · James Prestwood

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

#8 lore raw
In reply to James Prestwood

Hi James,

Quoted 5 lines · James Prestwood

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