How to turn off IPv6

# Append ipv6.disable=1 to the GRUB_CMDLINE_LINUX variable in

vim /etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT=2
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="ipv6.disable=1"

# Run
update-grub;
# and reboot.

or better,

edit /etc/sysctl.conf and add those parameters to kernel. Also be sure to add extra lines for other network interfaces you want to disable IPv6.

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

After editing sysctl.conf, you should run sysctl -p to activate changes or reboot system.

admin