Disable Ipv6

Posted on Sunday March 13, 2016 by Eric Potvin

IPv6 might caus issues with the Internet connection being slow. Unless you absolutely need it, it is recommended to disable it.

Edit the /etc/sysctl.conf file:

sudo vi /etc/sysctl.conf

Add at the bottom of the file or change the lines:

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

Reload the configuration.

sudo sysctl -p

Disable IPv6 on bind9

If installed, you need to fix the IPv6 on bind9. This will not stop bind from blindly trying to use IPv6. You also need to alter /etc/default/bind9, if of course your are using bind9:

sudo vi /etc/default/bind9

Add or modify the following lines:

# run resolvconf?
RESOLVCONF=yes
# startup options for the server
OPTIONS="-4 -u bind" -