Skip to content

Support us

Created: 2022-06-28 | Last update: 2022-07-17

Disable IPv6 on Ubuntu and Debian Linux Permanently

By default, Ubuntu/Debian IPv6 is enabled after installation. This means that the IPv6 stack is active and the host can communicate with other hosts on the same network via IPv6 protocol.

You can disable Ubuntu/Debian by editing the /etc/default/grub file.

nano /etc/default/grub

add ipv6.disable=1 to the end of GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX line. Don't change the other values at those lines.

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"

The config should look like this:

Grub Configuration

Update the grub configuration.

update-grub

Save and exit. Reboot to apply the changes.

Comments