How To Disable IPv6 in Ubuntu VPS

By | May 18, 2016

Hello,

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:
>> GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

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 : http://askubuntu.com/questions/440649/how-to-disable-ipv6-in-ubuntu-14-04