Wed 30 March 2011

Android IPv6 privacy extension

Currently in android the IPv6 privacy extension is not enabled by default or even build into the kernel. In the new gingerbread build from cyanogenmod it is available but not activated, but you can change that:

The following commands from a shell while your phone is connected via USB will activate it for the currently existing (all.use_tempaddr) /all future network devices (default.use_tempaddr).

adb shell sysctl -w net.ipv6.conf.all.use_tempaddr=2

adb shell sysctl -w net.ipv6.conf.default.use_tempaddr=2

You can check settings by running

adb shell sysctl -a

These changes will be reset after a reboot. To make them permantent simply echo the following two lines to /etc/sysctl.conf on your phone:

net.ipv6.conf.default.use_tempaddr=2 net.ipv6.conf.all.use_tempaddr=2