To disable system wide ie centos7 iirc
echo "net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf && sysctl -p
Should work
Almost forgot to avoid SSH issues
echo "AddressFamily inet" >> /etc/ssh/sshd_config && systemctl restart sshd