Disabling IPv6 for your VPN connection prevents IPv6 traffic from leaking outside the encrypted tunnel, which can expose your real IP address and location. This guide walks you through disabling IPv6 on Windows, macOS, and Linux, either system-wide or per-interface, depending on your needs.
What You’ll Need
- Administrator or root access to your computer
- Knowledge of your VPN client’s settings (some clients have a built-in IPv6 leak protection toggle)
- For Linux: a text editor (nano, vim) and familiarity with the terminal
Step-by-Step
Windows 10/11
- Open Network Connections: Press
Win + R, typencpa.cpl, and press Enter. - Identify your VPN adapter: Look for the adapter named after your VPN (e.g., TAP-Windows Adapter, WireGuard Tunnel, or your VPN provider’s name).
- Open adapter properties: Right-click the VPN adapter and select Properties.
- Uncheck IPv6: In the list of items, scroll down and uncheck Internet Protocol Version 6 (TCP/IPv6). Click OK.
- Restart the VPN connection: Disconnect and reconnect your VPN for the change to take effect.
Note: If your VPN client creates a virtual adapter only when connected, connect first, then follow steps 1–4, and the adapter will appear in the list.
macOS
- Open System Settings: Click the Apple menu → System Settings (or System Preferences on older versions).
- Go to Network: Click Network in the sidebar.
- Select your VPN service: Click on your VPN connection (e.g., VPN, Cisco IPSec, or IKEv2).
- Open Details: Click Details… next to the connection.
- Disable IPv6: Click TCP/IP tab, then next to Configure IPv6, select Off from the dropdown. Click OK.
- Apply: Click Apply to save changes.
Note: This disables IPv6 for that specific VPN interface only. If your VPN client creates a new interface each time, you may need to repeat this after each connection, or use a client that supports a global IPv6 toggle.
Linux (Ubuntu/Debian with NetworkManager)
- Open Network settings: Go to Settings → Network (GUI) or use
nm-connection-editor. - Edit your VPN connection: Click the gear icon next to your VPN connection.
- Go to IPv6 settings: Select the IPv6 tab.
- Set method to Ignore: Change the Method dropdown to Ignore (or Disabled).
- Save and reconnect: Click Save, then disconnect and reconnect your VPN.
Linux (via sysctl – system-wide)
- Open a terminal.
- Edit sysctl.conf: Run
sudo nano /etc/sysctl.conf. - Add these lines:
net.ipv6.conf.all.disable_ipv6 = 1net.ipv6.conf.default.disable_ipv6 = 1 - Apply changes: Run
sudo sysctl -p. - Verify: Run
ip -6 addr– you should see no IPv6 addresses.
Note: This disables IPv6 for the entire system, not just the VPN. To re-enable, change the values to 0 and reload.
Common Mistakes
- Disabling IPv6 on the wrong adapter: On Windows, you might disable IPv6 on your physical Ethernet/Wi-Fi adapter instead of the VPN adapter. This does not stop leaks through the VPN tunnel.
- Not restarting the VPN: Changes often require reconnecting the VPN to apply.
- Forgetting to re-enable after VPN disconnect: On macOS, if you set IPv6 to Off on the VPN interface, it may remain off for that interface even when the VPN is disconnected, potentially breaking normal IPv6 connectivity.
- Using sysctl on Linux without persistence: Running
sysctl -wdirectly only lasts until reboot. You must edit/etc/sysctl.confor a file in/etc/sysctl.d/.
Tips
- Check your VPN client first: Many VPN apps (e.g., OpenVPN, WireGuard clients) have a built-in “IPv6 leak protection” toggle. Enable that first—it’s the cleanest solution.
- Test for leaks: After disabling IPv6, visit an IPv6 leak test site (like ipleak.net) to confirm no IPv6 address is visible.
- Use a firewall rule instead: On Linux, you can block IPv6 only for the VPN interface with
ip6tables, preserving IPv6 for other connections. - Remember the trade-off: Disabling IPv6 entirely may slow down some websites that prefer IPv6, but the security benefit usually outweighs this.
Troubleshooting
- VPN still leaks IPv6: If you disabled IPv6 on the VPN adapter but the leak persists, check if your VPN client creates multiple adapters (e.g., a TAP and a TUN). Disable IPv6 on all of them.
- Can’t find the VPN adapter in Windows: Connect to the VPN first, then open
ncpa.cpl. The adapter should appear. If not, check your VPN client’s documentation for the adapter name. - macOS doesn’t have the “Off” option: Some VPN types (like IKEv2) may show “Off” but it reverts. Try using the terminal:
networksetup -setv6off "Your VPN Service Name". Find the exact service name withnetworksetup -listallnetworkservices. - Linux NetworkManager doesn’t save the “Ignore” setting: Ensure you click “Save” and that the VPN connection is not currently active. If it still reverts, edit the connection file manually at
/etc/NetworkManager/system-connections/and setipv6.method=ignore. - After disabling IPv6, some websites don’t load: This is rare, but if it happens, you can selectively disable IPv6 only for the VPN interface, not the whole system.
Frequently Asked Questions
Why does IPv6 leak even when my VPN is on?
Many VPNs only route IPv4 traffic through the tunnel. If IPv6 is still enabled, your system sends IPv6 requests directly through your ISP, bypassing the VPN, thus exposing your real IP.
Is disabling IPv6 safe?
Yes, for most users. IPv6 is not yet essential for everyday browsing, and disabling it only affects connectivity to IPv6-only sites, which are still a small minority.
Will disabling IPv6 slow down my internet?
No, in most cases. IPv4 and IPv6 traffic are separate; disabling IPv6 just means your device uses IPv4 only. Some sites might be slightly slower if they prefer IPv6, but the difference is usually negligible.
Can I disable IPv6 only for the VPN and keep it for my normal connection?
Yes. On Windows, uncheck IPv6 on the VPN adapter only. On macOS, set IPv6 to Off on the VPN interface. On Linux, use NetworkManager’s per-connection setting or a firewall rule.
Do I need to disable IPv6 on my router too?
No. Disabling it on your device is sufficient to prevent leaks from that device. Your router can still use IPv6 for other devices.
How do I check if IPv6 is disabled successfully?
Run an IPv6 leak test online (e.g., ipleak.net). If it shows no IPv6 address, you’re good. On Linux, you can also run ip -6 addr and see if any IPv6 addresses are listed.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Gmail Gemini Privacy: Data Access & Limit Settings
- Fix Outlook Inbox Corruption with DISM in Windows
- How to Set Up Apple Pay on iPhone
- How to Choose a Refurbished iPhone With Years of Support
- Voice Dictation in Google Docs: How to Use It
- Turn Off Message Notifications on Mac