< Back

How to disable IPv6 on a Linux device?

This guide will show you how to disable IPv6 on a Linux operating system.

 

Currently, Surfshark does not support IPv6 addresses, therefore, we recommend disabling IPv6 if it causes any connectivity issues.

 

Let's begin!

 

  1. Open the Terminal using the Ctrl+Alt+T keyboard shortcut. On the Terminal window, enter the following command:

    sudo nano /etc/sysctl.conf

    ipv6LINUX1.png

    This command will open the sysctl.conf file in the Terminal.


  2. Scroll down to the bottom of the sysctl.conf file and paste these lines.
    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

    ipv6LINUX2.png

    Save the changes by pressing Ctrl+O and Ctrl+X after that.

  3. Enter sudo sysctl -p to apply the changes in the sysctl.conf file.

    ipv6LINUX3.png

  4. Check the status of IPv6 by entering the following command in the Terminal:

    sudo cat /proc/sys/net/ipv6/conf/all/disable_ipv6

    If you see 1 as a reply, it means IPv6 is not running on your device anymore.


    ipv6LINUX4.png

Congratulations! You have learned how to disable IPv6 on your Linux device!

 

 

If you have any further questions, our customer success team is here to help you 24/7 over live chat or email.


You may also be interested in:

  1. How to make sure my connection was successful?
  2. How to enable 2FA on your Surfshark account?
  3. Linux unstable connection troubleshooting
Was this article helpful?