Disable IPv6

Debian 10

Create sysctl file:

sudo nano /etc/sysctl.d/90-disable-ipv6.conf

Add these lines:

/etc/sysctl.d/90-disable-ipv6.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Update sysctl:

sudo sysctl -p -f /etc/sysctl.d/90-disable-ipv6.conf

Ubuntu 18.04

Modify GRUB Bootloader

sudo nano /etc/default/grub

Modify the GRUB_CMDLINEs to include:

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"

Update changes to GRUB

sudo update-grub

sudo reboot

Last updated