Disable IPv6

sysctl utility

sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.conf.lo.disable_ipv6=1

To re-enable the IPv6, the process is the same as above except that instead of 1 keep it as 0.

GRUB

  1. Open the GRUB file using command line text editor.

nano /etc/default/grub
  1. Add ipv6.disable=1 in the following part. Save and exit.

GRUB_CMDLINE_LINUX_DEFAULT=”ipv6.disable=1 quiet splash”
GRUB_CMDLINE_LINUX=”ipv6.disable=1″
  1. Update the GRUB.

update-grub

To re-enable the IPv6, undo the modifications made in the GRUB file.

Last updated