Failed to Connect to IP: Permission Denied cPanel / WHM login
Unable to login into Cpanel/WHM. Getting the error Failed to Connect to IP: Permission Denied
Overview: This article describes steps to resolve the "Unable to login into cPanel/WHM: Failed to Connect to IP: Permission Denied" error by checking php.ini for restrictions, and ensuring SELinux is disabled.
Step 1: Ensure there are no restrictions set in the php.ini file that could prevent connections to the server. Specifically, look for settings related to network connections or IP restrictions that might be impacting cPanel/WHM access.
Step 2: Check SELinux status on both servers. SELinux can sometimes cause issues with cPanel/WHM access. It is advisable to disable it on both the gateway server and the remote servers.
To check the status of SELinux, use the following command.
root@gateway:~# sestatus
SELinux status: disabled
Step 2(A): If SELinux is not disabled, you can disable it by editing the configuration file. Open the SELinux configuration file using a text editor.
root@gateway:~# nano /etc/selinux/config
Set SELINUX=disabled in the configuration file:
SELINUX=disabled
Save the file and reboot the server to apply the changes and check by running the "sestatus" command again. It should return as 'disabled'.
Step 3: Attempt to log in to cPanel/WHM again after completing the above steps.
Step 4: Monitor for any error messages or logs that may indicate ongoing issues with connectivity or permissions.
Related Articles:
Error logs and configuration files.