Disable IPv6 To Prevent Wi-Fi Dropping Out On Debian8 Jessie

My wireless connection kept dropping out these days on Debian 8 Jessie. Many Debian users and Debian-based Linux distribution users are having the same problem.

A Not-So-Good solution

I open up a terminal and ping the IP address of my router.

ping 192.168.1.1

The ping program says host unreachable although the network manager icon says my computer is connected to my home wireless network. So I restart network manager with the following command (as root).

systemctl restart NetworkManager

Now I’m able to surf the Internet. But after a few minutes, Wi-Fi connection drops out again.

A Good Solution

To solve the problem for good, you need to disable IPv6 on Debian. The world is switching to IPv6 but the progress is very slow. Enabling both IPv6 and IPv4 on your computer can sometime cause problems. So if you have not a very good reason to keep IPv6, then disable it on your system.

Check IPv6 on Debian 8

Use ifconfig command to know whether IPv6 is enabled or not.

use ifconfig to check ipv6

If you see a line starting with inet6 addr, that means IPv6 is enabled on your system.

Disable IPv6 on Debian 8 Through Sysctl

Sysctl is used to change Linux kernel parameters at runtime. Edit /etc/sysctl.conf file as root.

nano /etc/sysctl.conf

Append the following lines at the end of the file.

# disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Save and close the file. Then use -p option to reload /etc/sysctl.conf configuration file.

sudo sysctl -p

Output:

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

Now check IPv6 again.

disable ipv6 on Debian 8

As you can see, the inet6 addr line is gone. That means IPv6 is successfully disabled.

Disable IPv6 on Debian 8 Through Grub Bootloader

You can also disable IPv6 by editing Grub configuration file.

nano /etc/default/grub

Append ipv6.disable=1 to GRUB_CMDLINE_LINUX line

disable ipv6 through grub config file

Save and close the file, then update Grub configuration and reboot your system.

update-grub2

reboot

The changes will be persistent across reboots.

Rate this tutorial
[Total: 3 Average: 5]

2 Responses to “Disable IPv6 To Prevent Wi-Fi Dropping Out On Debian8 Jessie

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here