Disable IPv6 on Ubuntu 20.04

Solution 1:

To permanently disable ipv6, you can update your grub file. You'll need administrative rights.

Edit /etc/default/grub with your preferred text editor. Make sure ipv6.disable=1 is added to the GRUB_CMDLINE_LINUX lines as follows:

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

Then

sudo update-grub

And you should be good after a reboot.