sudo nano /etc/sysctl.d/99-sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
sudo sysctl -p
References
https://www.linuxbabe.com/ubuntu/disable-ipv6-on-ubuntu
https://askubuntu.com/questions/440649/how-to-disable-ipv6-in-ubuntu-14-04
https://support.purevpn.com/how-to-disable-ipv6-linuxubuntu