Check if IPv6 is disabled
sysctl -a 2>/dev/null | grep disable_ipv6
Disabling IPv6 temporarily
sysctl -w net.ipv6.conf.all.disable_ipv6=1 sysctl -w net.ipv6.conf.default.disable_ipv6=1 sysctl -w net.ipv6.conf.lo.disable_ipv6=1
Disabling IPv6 Permanently
sudo nano /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6 = 1
sysctl -p
References
https://www.thegeekdiary.com/how-to-disable-ipv6-on-ubuntu-18-04-bionic-beaver-linux/
https://www.golinuxcloud.com/linux-check-ipv6-enabled/
https://www.garron.me/en/go2linux/sysctl-linux.html