How To Disable IPv6 in Ubuntu VPS


We can disable IPv6 in Ubuntu VPS. This time the Ubuntu version is 14.04 LTS.

To disable ipv6, you have to open /etc/sysctl.conf using any text editor and insert the following lines at the end:

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

Or we can disable from boot by editing the GRUB config

sudo gedit /etc/default/grub

In this file, find this line:

and change it to:
>> GRUB_CMDLINE_LINUX_DEFAULT=”ipv6.disable=1 quiet splash”

Save the file and update grub by running:

sudo update-grub

Have fun…

Source :