Support Center / How to manually disable IPv6 on Linux

How to manually disable IPv6 on Linux

Proton VPN now offers an official Linux app with graphical user interface and an official Linux CLI. Both these clients have built-in IPv6 leak protection, with no user configuration required.

We recommend using our official Proton VPN apps on Linux. However, it is also possible to manually configure a VPN connection in Linux using the  OpenVPN or IKEv2 VPN protocols.

If using a manual VPN connection, we recommend disabling IPv6. The following solution should work for most Debian-based distros.

1) Open Terminal and enter the command:

sudo nano /etc/sysctl.conf

2) Add all the lines to the bottom of the file and save it:

net.ipv6.conf.all.disable_ipv6 = 1 
net.ipv6.conf.default.disable_ipv6 = 1 
net.ipv6.conf.lo.disable_ipv6 = 1 
net.ipv6.conf.tun0.disable_ipv6 = 1

3) Now make the system read the file and confirm the changes using this line:

sudo sysctl -p

That’s it! In order to check whether IPv6 was disabled on your computer, you can do an IPv6 leak test here.

Related articles:

How to use Proton VPN on Linux
How to disable IPv6 on Windows
How to disable IPv6 on macOS

Post Comment


  1. Robin S. Hicks

    I’ve found that the following method, for improving DNS privacy in Firefox, solves the VPN leakage problem without disabling IPv6, but I believe that this only works for Firefox.

  2. ProtonVPN Team

    Hello Robin, thank you for pointing this out, this does help but only for few of our customers in our experience, so we hope that someone will find your comment helpful!

  3. Robin S. Hicks

    The only problem I’ve found with this method (Running Ubuntu 18.04). Is that after every restart, you have to rerun the ‘sudo sysctl -p’ command to initialize the disabling of IPv6, otherwise the system just falls back to enabling IPv6.

  4. genn

    I added those 4 lines to /etc/sysctl.conf but after I run “sudo sysctl -p” I get this error:
    cannot stat /proc/sys/net/ipv6/conf/tun0/disable_ipv6: no such file or directory.
    How can I resolve? Thanks

  5. ProtonVPN Team

    Hello Glenn, first of all, are you sure you are leaking ipv6 requests? Please contact our customer support team with detailed information about your current device.

  6. FrustdUsr

    After execute this command “sudo sysctl -p” my Linux Mint Sylvia is telling me this:
    “net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 1
    sysctl: can’t execute stat on /proc/sys/net/ipv6/conf/tun0/disable_ipv6: file or directory doesn’t exist”

    How can i fix this?

  7. ProtonVPN Team

    Hello, tun0 is the network interface for the VPN. If you do not have VPN on or installed, it could be that its not able to locate it. If you are leaking the IPV6 addresses, just try to test the connection again now after doing those commands.

  8. Terance

    After i edited the sysctl.conf file and run the cli tool I get this message:
    [!] This is an error in enabling ipv6 on the machine. Please enable it manually.
    Which is a abit confusing?

  9. ProtonVPN Team

    Hello Terance, could you please run the command sudo protonvpn-cli -init ? if that does not help and you are sure that you are using OpenVPN credentials, please contact our customer support team –

  10. kullanici

    I could not connect ProtonVPN because I got this error:

    Connecting …
    [!] Error connecting to VPN.
    [!] There are issues in managing IPv6 in the system. Please test the system for the root cause.
    Not being able to manage IPv6 by protonvpn-cli might cause issues in leaking the IPv6 address

    I still can not connect when I apply the method described here. I’m warning you:

    Connecting …
    [!] Error connecting to VPN.
    [!] This is an error in enabling ipv6 on the machine. Please enable it manually

    I’m using Linux Mint 18.3

  11. ProtonVPN Team

    Hello, Could you please try running sudo protonvpn-cli -init and make sure you are using your OpenVPN credentials from your account page on , if that does not help, please contact our customer support team.

  12. bashroot

    Lewis is correct (just tested it on my 17.10 machine).
    For anyone running ubuntu 17.10: You have to run
    sudo sysctl -p
    after the sysctl.conf file has been edited and saved in order for the ipv6 settings to take effect.

  13. ProtonVPN Team

    Thank you for pointing that out, we will add it to the article, even though we were not able to replicate it. If you spot anything else or have any improvement suggestions, feel free to let us know!

  14. Lewis

    Just wanted to comment that I tried this, but I still got 10/10 ‘readiness score’ for IPv6 on the test you linked to. Kubuntu 17.10.

  15. ProtonVPN Team

    Hello Lewis,

    Could you please provide more detailed information and attached screenshots of few sites like and to our support ?

  16. Lewis

    Hello, ProtonVPN Team,

    About the failure to stop IPv6, there’s really little to say or show, other than that I got test results showing me my actual IPv6 address (in my ISP country), while my IPv4 test result was that of the VPN tunnel exit location.

    I have, however, found the following solution, via this AskUbuntu thread:

    Add the following lines to /etc/sysctl.conf
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 1
    Then run
    sudo sysctl -p
    to “enable” the new settings, I guess. This seems to have taken care of all my VPN leakage.
    In addition, I’ve been in the network settings, under IPv6 tab, and set Method > Ignored. Dunno if this made any difference, but there it is.

    I hope you’ll have a look into this, and update the guide if you as well find it to be a working solution, and not just a lucky strike by me.

Comments are closed.

your internet

Get Proton VPN
Get Proton VPN

For customer support inquiries, please submit the following form for the fastest response:
Support Form

For all other inquiries:

Version: OpenPGP.js v4.10.10


You can also Tweet to us: