When setting up your cPanel & WHM installation, a few items, such as the security of your server, require configuration. Specific ports need setup for the cPanel & WHM software to function accordingly.
You want to make sure that you select only ports required by the cPanel & WHM software. This way, you can minimize unforeseen events.
Before setting up, we recommend making sure that you have the best practices in place. You want to make sure that you have access to your server at all times.
To be able to begin setting up, you have a few options available to choose from, depending on your Operating System. Here are the steps to open the ports:
For CentOS 7, CloudLinux 7, and RHEL 7 firewall management. Firewalld packages should be installed by default. In case it's not available, you can install by running the following:
# yum install firewalld -y
For CSF, you can install CSF, by running the following commands as the root user:
# cd /usr/src
# rm -fv csf.tgz
# wget https://download.configserver.com/csf.tgz
# tar -xzf csf.tgz
# cd csf && ./install.sh
The following document is available to help you to configure your firewall: