Attention: this item is more than 5 years old, links can be broken and information can have been updated.
I like having the 'predictable' IPv6 address for my laptop at home, but at the same time I was pondering the implications of having the same EIU-64 address everywhere. Which can be fixed by enabling the privacy extensions.As I use wicd for connection management I had a look at Adding pre and post (dis)connection scripts - Wicd Wiki which showed clear options. The easiest way to 'recognize' my home networks is by assigned v6 range. So I created /etc/wicd/scripts/postconnect/ipv6privacychoice with:
#!/bin/bash connection_type="$1" if [ "${connection_type}" == "wired" ]; then v6prefix=`rdisc6 eth0 -q -1` if [ "${v6prefix}" = "2001:980:14ca:1::/64" ]; then sysctl net.ipv6.conf.eth0.use_tempaddr=0 else sysctl net.ipv6.conf.eth0.use_tempaddr=2 fi elif [ "${connection_type}" == "wireless" ]; then v6prefix=`rdisc6 wlan0 -q -1` if [ "${v6prefix}" == "2001:980:14ca:2::/64" ]; then sysctl net.ipv6.conf.wlan0.use_tempaddr=0 else sysctl net.ipv6.conf.wlan0.use_tempaddr=2 fi else echo "Unknown connection type: ${connection_type}" exit fi