How to disable IPv6 on all devices

IPv4 is running out, so IPv6 is the future. Unfortunately, the world is not fully ready for IPv6. This includes many VPN services, whose software does not protect users against “IPv6 leaks.” The simplest solution to this problem is to disable IPv6 on your device.

What is IPv6?

Every internet connection has a unique numeric address known as its Internet Protocol (IP) address. At present, most IP addresses use the older 32-bit IPv4 standard, but with a total of “only” 4.29 billion of these available, IPv4 addresses are running out fast.

The solution is to simply use longer IP addresses, which is exactly IPV6 does. By using 128-bit web addresses, IPv6 makes around 340 billion billion billion billion addresses available. Which should keep us going for a while!

Do I have IPv6?

Whether you have IPv6 capability depends on your internet provider. IPv6 deployment by ISPs has been rather slow almost everywhere, although in some countries it is more common than others. Overall, in 2019 most people do not yet have an IPv6 connection, although this is beginning to change. 

If you’re not sure if you have an IPv6 connection then visit ipleak.net (without a VPN connection).

IP test

If you don’t see a long IPv6 address, then you don’t have an IPv6 connection and you have no need for this guide.

There is no point in disabling IPv6 on your device if you do not have an IPv6 connection, although if you regularly connect to the internet using other people's connections, such as public WiFi hotspots, then you might want to do it anyway.

Why disable IPv6?

The move to IPv6 is a good and necessary thing, so why disable IPv6 if you have it? The only reason to do this is that many VPN apps properly route IPv4 connections through the VPN interface but do not do so for IPv6. This allows websites to see your real IP address and is known as an IPv6 leak.

Disabling IPv6 at the system level ensures no leaks are possible. The good news is that disabling IPv6 on your device costs you nothing. IPv4 is not going away soon, and every website and internet resource supports IPv4. IPv6 might be the future, but the future is not here yet.

This means you can disable IPv6 to secure your VPN connection without any negative consequences to your internet use.

A word on WebRTC

WebRTC is a communications protocol built into most modern browsers that allows for seamless voice and video communication inside your browser window.

A design feature of WebRTC is that it allows users to communicate through firewalls by simply telling other WebRTC users (and websites) your real IP address. If you have an IPv6 connection, it will tell them your IPv6 address, and if you don’t then it will tell them your IPv4 address

This feature is great for WebRTC users but is a pain for VPN users as it leaks your real IP address regardless of whether you are using a VPN. The problem is commonly referred to as a WebRTC leak. 

Note that if you see a WebRTC leak then disabling IPv6 on your device might fix the problem, but it's just as likely that WebRTC will instead leak your IPv4 address instead. Disabling IPv6 is therefore not the recommended solution to preventing IPv6 WebRTC leaks. 

There are things a VPN service can do at the client and server level to reduce the chance of WebRTC leaks happening, but the only guaranteed solution is to disable WebRTC in your browser. 

How to disable IPv6 on your device

Windows (most versions)

  1. Right-click Start -> Search -> type Control Panel into the search box and select the result.

    control panel in windows start up

  2. Select Network and Sharing (or View network status and tasks if in Category mode).

    network and sharing

  3. Go to Change adapter settings.

    change adaptor settings

  4. Right-click on your internet connection -> Properties.

    wifi properties

  5. Scroll down until you see Internet Protocol Version 6 (TCP/IPv6) and uncheck its box.

    internet protocol version 6 in WiFi properties

  6. Click OK and you’re done. 

macOS

  1. Go to System Preferences...

    Mac system preferences

  2. Click “Network”.

    Network  settings icon

  3. Select your internet connection -> Advanced.< br />

    WiFi settings and advanced setting option

  4. Go to the TCP/IP tab -> Configure IPv6: -> Off.

    In the TC/IP tab, configure IPv6 to off

  5. Click OK and you're done.

Linux

There are two ways to disable IPv6 on Linux operating systems. You can do this using either command line or network-manager, see the steps below to find out how. 

Using Network Manager

  1. Go to Settings -> Network. Click on the settings/options tab for your network.

    Network manager settings

  2. Switch to the IPv6 tab -> IPv6 Method -> Disable.

    disable IPv6 button

  3. Click Apply and you're done.

Using the command-line

Debian (includes Ubuntu and Mint) and SuSE systems

To permanently disable IPv6 we must edit the sysctl.conf file. 

  1. Open Terminal and enter the following command:
    sudo nano /etc/sysctl.conf
  2. Scroll down to the bottom and add the following lines:
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1 
    net.ipv6.conf.lo.disable_ipv6 = 1

  3. Save and close the file, then execute then changes using the following command:
    sudo sysctl -p
    A reboot won’t hurt either. To re-enable IPv6 just remove the added lines from /etc/sysctl.conf.

Red Hat systems (includes Fedora and CentOS) 

Open Terminal and enter the following commands:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1

sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

To re-enable IPv6 enter the following commands:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0

sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0

Android

It is not possible to disable IPv6 in Android for WiFi connections without rooting your phone. You can, however, disable it for mobile data connections. 

  1. Go Settings -> Connections -> Mobile networks -> Access Point Names. Select your mobile operator the scroll down to APN protocol and select it.

    APN protocol option in android

  2. Select IPv4.

    APN protocol IPv4 and IPv6 options

  3. And you’re done.

It should be noted, though, that it might be a better idea to just use OpenVPN for Android instead of your leaky custom app. It can ensure that unwanted IPv6 connections outside the VPN interface are not possible.  

  1. Open the OpenVPN for Android app and Edit icon for your VPN connection.

    OpenVPN for Android profiles

  2. Switch to the Routing tab and Block IPv6 (or IPv4) is not used by the VPN is enabled (it is by default).

    block IPv6 (or IPv4) options

iOS and iPadOS

It is not possible to disable IPv6 on Apple’s mobile platforms at the system-level, although the OpenVPN Connect app can route connections through IPv4 only. Just go to settings -> and select IPv6 -> IPV4-only tunnel.

IPv4 only tunnel option

Chromebook

It is not usually possible to disable IPv6 at the system level in Chrome OS. If you enter Developer mode, you can temporarily disable IPv6 by opening a Chrome window entering:

sudo ip6tables –F

But this only works until you reboot your Chromebook. A better solution is to use the OpenVPN for Android app to prevent IPv6 leaks instead of your VPN provider’s custom app.

OpenVPN for Android Settings

As with all Android VPN apps run on a Chromebook, this will secure all native ChromeOS and all Android connections on your Chromebook. It will not secure connections for Linux apps running under ChromeOS, however.

Written by: Douglas Crawford

Has worked for almost six years as senior staff writer and resident tech and VPN industry expert at ProPrivacy.com. Widely quoted on issues relating cybersecurity and digital privacy in the UK national press (The Independent & Daily Mail Online) and international technology publications such as Ars Technica.

1 Comment

  1. Paul revere

    on October 3, 2019
    Reply

    Editors note: Sorry, messed up an excellent comment from Paul, saying that you shouldn't disable IPv6 and that you should demand your VPN support IPv6 instead. He also noted that 90% of US mobile companies now support IPv6.

Write Your Own Comment

Your comment has been sent to the queue. It will appear shortly.

Your comment has been sent to the queue. It will appear shortly.

Your comment has been sent to the queue. It will appear shortly.

  Your comment has been sent to the queue. It will appear shortly.

We recommend you check out one of these alternatives: