7

I understand privacy extensions and that you enable them by setting use_tempaddr. Unfortunately I haven't found any explantion for the different settings. Every articel I read used either 1 or 2 or cited kernel.org without further explanation.

The Kernel.org documentation*:

use_tempaddr - INTEGER
  Preference for Privacy Extensions (RFC3041).
    <= 0 : disable Privacy Extensions
    == 1 : enable Privacy Extensions, but prefer public
           addresses over temporary addresses.
    >  1 : enable Privacy Extensions and prefer temporary
     addresses over public addresses.
  Default:  0 (for most devices)
           -1 (for point-to-point devices and loopback devices)

But I still do not understand the difference between 1 and >1. What's the public IP in contrast to the temporary IP? The one that is assigned with DHCP / set statically? Or something else?

Thanks for your help!

Synchro
  • 2,983
  • 5
  • 25
  • 35
wedi
  • 318
  • 4
  • 11

1 Answers1

7

Privacy extension is usable with Stateless Address Autoconfiguration (SLAAC). This option doesn't have effect for DHCPv6 or static configuration. With privacy extension, you have at least two public IPv6 addresses (and link-local FE80::), one, for example, with EUI-64 identifier and one with identifier generated according to RFC-3041. You can see it with command ip a. Station listens on both of them, but use_tempaddr 1 or 2 to define which address is used for outgoing traffic.

When use_tempaddr=2, the privacy address is used as source of all outgoing traffic. With use_tempaddr=1, system generate privacy address is used, but as the more "predictable" one is used for outgoing traffic, its purpose looks to be redundant.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
Quantim
  • 1,269
  • 11
  • 13
  • Yes indeed, `use_tempaddr=1` does look useless. Thank you. I am happy to hate blindly following tutorials. Most of them suggest `1`. – wedi Aug 15 '18 at 07:31
  • 3
    Even if the privacy address isn't used by default it would still be possible for applications to explicitly bind to it. But I agree the value of setting up a privacy address and not use it by default is very limited. – kasperd Aug 16 '18 at 07:40