If you are looking for an effective way to disable IPv6 on your Linux system, then follow carefully the steps given in this tutorial. This method works on the following Linux distributions:
It also works with other distributions.
Before we start, you need first to check if IPv6 is enabled or not on your system by running this command via the terminal:
(1 = Disabled, 0 = Enabled)
To disable IPv6, edit as root the /etc/sysctl.conf file and add the following:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
After saving the /etc/sysctl.conf file, launch the terminal as root and run this command to restart your configuration:
IPv6 is now disabled on your system.