Disable IPv6

# grub: /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
update-grub
 
# sysctl
sudo echo "#disable ipv6" >> /etc/sysctl.conf
sudo echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
sudo echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
sudo echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf
 
sudo sed -i 's|udp6|#udp6|g' /etc/netconfig
sudo sed -i 's|tcp6|#tcp6|g' /etc/netconfig
 
# Links
https://askubuntu.com/questions/309461/how-to-disable-ipv6-permanently/337736#337736