cPanel License Stops Working After a Firewall or Server Restart
If cPanel/WHM was working normally and then starts showing a license invalid message or a red license warning after a firewall restart, server reboot, or cPanel update, the issue may be related to the server's firewall or licensing connectivity.
This guide covers common situations that can trigger the problem and the steps you can take to identify and resolve it.
- CSF was restarted using
csf -rorcsf -ra - CSF was enabled again after being disabled
- iptables or firewalld was restarted
- The server was rebooted
- A cPanel automatic update was installed
- A security or firewall tool flushed the existing firewall rules
Why Can This Happen?
A firewall restart or rule flush can change the server's active network rules. If the rules required for communication with the licensing service are removed or blocked, cPanel may be unable to complete its license verification.
In this situation, the license information may still exist on the server, but cPanel cannot successfully communicate with the licensing service. This can result in a license invalid warning.
This type of problem does not necessarily mean that your payment or license has expired. First, check the license status and the server's outbound connectivity.
First Step: Refresh the cPanel License Check
Log in to your server through SSH as root and run the standard cPanel license refresh command:
/usr/local/cpanel/cpkeyclt
Allow the command to finish, then refresh your WHM interface and check whether the license warning has disappeared.
If the command reports an error, save the complete output. It can help identify whether the problem is related to connectivity, the license service, or another server configuration issue.
Check the cPanel License File
You can also verify that the local cPanel license file is present:
ls -la /usr/local/cpanel/cpanel.lisc
If the file is present but cPanel still reports an invalid license, the next step is to investigate the license verification process and network connectivity.
If the License Check Is Already Running
If cpkeyclt reports "A License check appears to already be running", a previous license-check process may still be active or may have left a stale process state.
Do not repeatedly start license checks. Wait briefly and check whether another cPanel license process is currently running. If the problem continues, contact support with the exact command output so the process can be reviewed safely.
Check Your Firewall Configuration
CSF, iptables, firewalld, and other security tools can modify the server's active firewall rules. A restart or configuration reload may remove rules that were previously allowing required outbound connections.
If the problem appeared immediately after restarting CSF or another firewall service, review the firewall configuration and make sure outbound connections required by cPanel licensing are not being blocked.
Also check whether a security audit or automated firewall-management tool recently changed or flushed your rules.
CSF Restart and License Problems
CSF can reload the firewall configuration from scratch when it is restarted. If required network access was previously allowed by a temporary or manually added rule, that access may no longer be available after the reload.
If the license stops working every time CSF is restarted, review your CSF configuration and persistent firewall rules with your server administrator. The goal should be to maintain the required legitimate outbound connectivity after every firewall reload.
What About cPanel Auto-Updates?
cPanel updates can sometimes change server components or configurations that affect third-party software and services. If the license problem started immediately after a cPanel update, note the cPanel version and update time before making additional changes.
For servers running the cPanel 130+ branch, pay particular attention to recent automatic updates and security changes. If an update appears to be responsible for the issue, contact support before making major changes to the cPanel installation.
Check for Outbound Firewall Blocks
If you see an error such as "Failed to connect to licensing server", the server may be unable to establish the required outbound connection.
Check the following:
- Whether the server has working internet connectivity
- Whether outbound traffic is restricted by CSF, iptables, firewalld, or another firewall
- Whether DNS resolution is working correctly
- Whether a recent firewall or security change affected outbound connections
- Whether the hosting provider has network-level restrictions
When to Contact ServerLicenser Support
Contact support if the license warning remains after performing the standard cPanel license check or if you cannot determine what changed on the server.
Support can assist further if:
- The license warning remains after refreshing the cPanel license check
- You cannot access the server through SSH
- You receive "Failed to connect to licensing server"
- The problem returns after every CSF restart
- The issue started immediately after a cPanel update
- Your firewall configuration appears to be blocking required licensing connectivity
When opening a support ticket, provide the server IP address, the exact error message, and a screenshot or command output if available. This will help the support team diagnose the problem more quickly.
Quick Troubleshooting Checklist
- Refresh the cPanel license check using
/usr/local/cpanel/cpkeyclt. - Refresh WHM and check the license status again.
- Verify that the local cPanel license file exists.
- Check whether CSF, iptables, or firewalld was recently restarted.
- Review outbound firewall rules and server connectivity.
- Check whether a recent cPanel update preceded the problem.
- Contact ServerLicenser support if the warning remains.
Related Articles
- Remove the WHM Critical Security Update Banner (4 Steps) — Troubleshoot the WHM security update banner and related cPanel update issues.
- WHM Password Keeps Changing? It's cPHulk — Permanent Fix — Troubleshoot WHM login problems caused by cPHulk.
- Browse All Troubleshooting Articles
