[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to prefer temporary address? (raspbian / stretch)



Il 17/08/19 11:50, Pascal Hambourg ha scritto:


It would be clearer if you posted the output of
  ip -6 addr
If you have privacy concerns feel free to mangle the /48 prefix assigned by the tunnel broker.

(before the config changes)
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 xxxx:xxxx:xxxx:2::514/128 scope global noprefixroute
       valid_lft forever preferred_lft forever
inet6 xxxx:xxxx:xxxx:2:2683:43e7:578e:c0c2/64 scope global mngtmpaddr noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::7625:efb1:f044:1d42/64 scope link
       valid_lft forever preferred_lft forever


Where does this /64 address come from? In the logs I see it mentioned by avahi-daemon and dhcpd but I cannot find a corresponding lease file.
dhcpd (ISC DHCP server) or dhcpcd (DHCP client daemon) ?

Found it: mngtmpaddr means it is used as a template for PE addresses.
I wrongly assumed this should only be present when PE is enabled.


More important, how do I get the sytem to generate and prefer a temporary address for outgoing connections?
  sysctl net.ipv6.conf.${INTERFACE}.use_tempaddr=2
How to set it at the system configuration level depends on the network configuration framework used. With ifupdown, add the following option to the iface stanza in /etc/network/interfaces :

I created /etc/sysctl.d/local.conf with these two lines:
net.ipv6.conf.eth0.use_tempaddr = 2
net.ipv6.conf.wlan0.use_tempaddr = 2

After reboot I verified that it is using the temporary address, for example when sending a mail through an external relay.


(after the changes)
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 xxxx:xxxx:xxxx:2::514/128 scope global noprefixroute
       valid_lft forever preferred_lft forever
inet6 xxxx:xxxx:xxxx:2:cdcc:a2ea:3107:297e/64 scope global temporary dynamic
       valid_lft 604076sec preferred_lft 85667sec
inet6 xxxx:xxxx:xxxx:2:2683:43e7:578e:c0c2/64 scope global mngtmpaddr noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::7625:efb1:f044:1d42/64 scope link
       valid_lft forever preferred_lft forever



Thank you for your help,
Andrea.


Reply to: