1

Today, I've successfully set up a home VPN router with OpenWrt and OpenVPN.

Since my VPN provider only supports IPv4 connections, I don't want network traffic to leak out and I've disabled IPv6 by unchecking "Internet Protocol Version 6" in the network adapter options in the Windows control panel.

Annoyingly, every time I go to university/work, I need to re-enable IPv6, because certain services provided by IT administration need IPv6 connectivity to function properly.

For convenience's sake, is there a way to disable IPv6 connectivity in Windows, only if I connect to my VPN router?

1
  • Why do you think IPv6 is insecure? It has been a part of Windows for a very long time.
    – anon
    Commented Dec 17, 2022 at 19:21

2 Answers 2

0

You may enable or disable IPv6 via a PowerShell command running with Administrator permissions. This would be much simpler to do.

You may create a .bat file containing one of the following commands, create a desktop icon that points to it and set it as "Run as administrator" (right-click > Properties > Advanced).

To disable IPv6 for the adapter named "Ethernet" :

powershell -command Disable-NetAdapterBinding -Name "Ethernet" -ComponentID ms_tcpip6

To enable :

powershell -command Enable-NetAdapterBinding -Name "Ethernet" -ComponentID ms_tcpip6
0

Instead of disabling IPv6 access on the hosts, disable it on your VPN router, as that's most likely how you enabled it in the first place.

You can do it either by adding the appropriate firewall rules to prevent IPv6 packets from leaving through the WAN interface, and/or by making OpenWRT not advertise itself as a "default gateway" via SLAAC (set Router Lifetime to zero).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .