Last modified at 5/7/2014 6:43 PM by Koen Zomers

​By default, a Windows PC will assign a pseudo-random IPv6 address to a Windows machine. The reason for this is anonymousity. With IPv6, each device will have its own world-wide IP address thus all traffic originating from the address can easily be linked to one machine and often one person. For that reason, the pseudo-random algorithm on IPv6 addresses was created to make sure your machine will have a different IP address to the outside world after each reboot. A very detailed background story on this including the specifics on the algorithm can be found on this website.

There are cases in which you don't want a different IPv6 address to be assigned each time you reboot your machine. For example when you want to restrict firewall rules to your specific machine. Or if your machine needs to accept traffic from the internet it would be handy to be certain its address will remain the same. In order to establish this, you need to execute the following commands once on your machine:

  1. ​Open a Windows Command Processor window (the good old DOS prompt). Make sure it's elevated to administrative credentials in case you still have User Account Control (UAC) enabled.


  2. Execute the following commands (or execute the batch file in this zip):

    netsh interface ipv6 set privacy state=disabled store=active
    netsh interface ipv6 set privacy state=disabled store=persistent
    netsh interface ipv6 set global randomizeidentifiers=disabled store=active
    netsh interface ipv6 set global randomizeidentifiers=disabled store=persistent

    Windows-PreventTempIPv6-NetshCommands.png

  3. Reboot your Windows PC


  4. You can now browse to a website like IP6.me​ to see the IPv6 address with which you hit the outside world or open up an elevated Windows Command Processor window again and run the following command to verify that you no longer have a temporary IPv6 address assigned.

    Windows-PreventTempIPv6-NetshShowAdd.png
    Windows-PreventTempIPv6-IP6me.png
Many thanks to the author of this blogpost for sharing this wisdom!