Wait! We Have a Special Deal!

Get CactusVPN for $3.5/mo!

Save 64% Now
30-Day Money-Back Guarantee
Setup Tutorials

How to Disable IPv6 on Linux

Follow this step-by-step tutorial to learn how to disable IPv6 on Linux from command line.

  1. Open the Terminal (1).

    How to Disable IPv6 on Linux: Step 1

  2. Type: sudo su and enter your password to act as root.

  3. Type: nano /etc/sysctl.conf and press “Enter” to open the configuration file. Or, just use your favorite text editor to edit this file.

  4. Add the following lines to the sysctl.conf file:

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

    For nano, press “CTRL+O” then “Enter” to save the modifications and “CTRL+X” to close the file.

  5. In the Terminal type: cat /proc/sys/net/ipv6/conf/all/disable_ipv6 and press “Enter”.

    If the output is “1”, your have IPv6 already disabled and no further actions are required. If the output is “0”, follow the next steps.

  6. Type: sysctl -p

    You should get something like this:

    How to Disable IPv6 on Linux: Step 2

  7. Type: cat /proc/sys/net/ipv6/conf/all/disable_ipv6 and press “Enter”.

    Now you should get “1” as a result, which means you have successfully disabled IPv6.

VPN and Smart DNS Services

Protect online privacy, secure your connection and access blocked websites

Try CactusVPN For Free