Introduction
This article aims to assist you with disabling IPv6 on your server. If your server has broken IPv6 networking, this can lead to issues such as backup destination validation timeouts. You can work around these issues by disabling IPv6 on your server.
cPanel software support cannot make any modifications to your server's network on your behalf. It is recommended to have the steps mentioned in this article carried out by a system administrator.
Procedure
To disable IPv6 on your server, run the following command via SSH as the root user:
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
This setting will revert on a reboot. To make the change permanent, append the below lines in /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
Then, run the following command to make the settings effective:
sysctl -p
Lastly, you will want to ensure SSH is configured to only use IPv4 to ensure disabling IPv6 does not adversely affect SSH. To disable IPv6 on SSH, edit or add the following entry into /etc/ssh/sshd_config:
root@server [~] # vi /etc/ssh/sshd_config .... AddressFamily inet ....
Then, restart SSH for this change to take effect.
/scripts/restartsrv_sshd
If you remove the kernel modules for IPv6, your operating system will generate warnings in cPanel & WHM, may prevent account creation, and may cause service failures.
For reference: