Public bug reported:

I'm on a fresh install of 18.04 Server. It ships with the following file
in /etc/sysctl.d:

# cat /etc/sysctl.d/10-ipv6-privacy.conf
# IPv6 Privacy Extensions (RFC 4941)
# ---
# IPv6 typically uses a device's MAC address when choosing an IPv6 address
# to use in autoconfiguration. Privacy extensions allow using a randomly
# generated IPv6 address, which increases privacy.
#
# Acceptable values:
#    0 - don’t use privacy extensions.
#    1 - generate privacy addresses
#    2 - prefer privacy addresses and use them over the normal addresses.
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2

however, on boot, my physical NIC enp0s31f6 ends up with use_tempaddr
set to 0:

# for i in $(ls /proc/sys/net/ipv6/conf/*/use_tempaddr); do echo $i; cat $i; 
done;
/proc/sys/net/ipv6/conf/all/use_tempaddr
2
/proc/sys/net/ipv6/conf/default/use_tempaddr
2
/proc/sys/net/ipv6/conf/enp0s31f6/use_tempaddr
0
/proc/sys/net/ipv6/conf/lo/use_tempaddr
-1

Explicitly adding the following line to 10-ipv6-privacy.conf does not
fix:

net.ipv6.conf.enp0s31f6.use_tempaddr = 2

It appears that a later stage of the boot process reapplies the 0 value.
A workaround is to add the line, then create an additional systemd unit
that runs `systemctl restart systemd-sysctl.service` at the end of the
boot process.

I think the expected behavior, given the contents of
/etc/sysctl.d/10-ipv6-privacy.conf, is that all NICs should come up with
use_tempaddr set to 2. This does not happen; moreover, the workaround is
counterintuitive.

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770919

Title:
  use_tempaddr is reset to 0, despite /etc/sysctl.d

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1770919/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to