How-To Disable IPv6 for Cpanel Server? Print

  • cpanel & whm, cpanel hosting, cpanel
  • 0

Introduction

This article explains how to disable IPv6 on your server. If your server's IPv6 networking fails, you may see backup destination validation timeouts. You can work around these issues by turning off IPv6 on your server.

cPanel software support cannot modify your server's network on your behalf. It is advised that the actions in this article be 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: 

Was this answer helpful?

« Back

Powered by WHMCompleteSolution