If you are using iptables as the only firewall on the server and you wish to configure it to allow connections to the cPanel.

You may use the following rules add the cPanel ports for cPanel, WHM and Webmail.

# /sbin/iptables -I INPUT -p tcp -m tcp –dport 2082:2083 -j ACCEPT

# /sbin/iptables -I INPUT -p tcp -m tcp –dport 2086:2087 -j ACCEPT

# /sbin/iptables -I INPUT -p tcp -m tcp –dport 2095:2096 -j ACCEPT

Now save and restart the firewall

# service iptables save

# service iptables restart