You are here

How to disable IPv6 in Ubuntu


I've collide here with an incomprehensible situation in Ubuntu, if you turn on the bridge for KVM, if you get an IPv6 address, this IPv6 hangs fast, about once every 5-10 minutes, when the interface is restarted, everything starts to work for 5-10 minutes, then hangs again. In this case, IPv4 continues to work. Routes like IPv6 and IPv4 remain. Because of what many resources stop working, google, yandex, update the application database (apt-get update). In general, all that can work on IPv6 safely stops working when the bridge hangs. In the logs, there are no errors, where to dig is not clear. It is exactly known that this is happening on Ubuntu 15.10, at 14.04 it works like a clock.

In short, I was tired of restarting the network interface every 10 minutes, and I decided to just disable IPv6.

To do this, add the following lines to the end of the /etc/sysctl.conf file, of course, you need to change the interface names to your:

net.ipv6.conf.br0.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eno1.disable_ipv6 = 1

Then you need to restart the network:

sudo /etc/init.d/networking restart

The interface should stop receiving IPv6. After this procedure, the bridge started working as a clock, though without the sixth version of IP.

Video on the topic:

0 0

Share the article with your friends in social networks, maybe it will be useful to them.


If the article helped you, you can >>thank the author<<