Is your VDS becoming unreachable after installing cPanel and performing a reboot? This is a common issue caused by misconfigured firewall rules, missing port access, or improper network settings. In this article, we'll explain how to permanently fix cPanel access problems after reboot by correctly configuring ports, disabling unnecessary firewalls, and ensuring your network settings persist across reboots.
1. The Problem: Why Do You Lose Access After Installing cPanel?
When you install cPanel on a fresh VDS, the setup process might modify:
-
Network interface behavior (such as
eth0
,ens18
, etc.) -
Firewall configurations (
firewalld
,iptables
) -
SSH and cPanel-related port permissions
-
Cloud-specific routing or NAT settings
After a reboot, the server may lose connectivity because one or more of these configurations reset or block access.
2. Permanent Fix: Step-by-Step Solutions
2.1 Open Required Ports
Make sure all essential ports are open:
For firewalld
:
For iptables
:
2.2 Make Network Configuration Persistent
Edit your network interface config (/etc/sysconfig/network-scripts/ifcfg-eth0
or similar):
Replace values with your hosting provider’s IP information.
Apply changes:
2.3 Disable NetworkManager (Optional)
In some cases, NetworkManager
can override your network config after a reboot:
3. Disabling firewalld (Temporary Solution)
If you're in a rush and can't configure ports correctly right now:
Warning: This is not recommended for production servers. It’s better to open only the required ports instead of disabling your firewall entirely.
4. Additional Steps After cPanel Installation
-
License check:
/usr/local/cpanel/cpkeyclt
-
Check if cPanel services are running:
systemctl status cpanel
-
NAT configuration (if needed): WHM > Basic WebHost Manager Setup > Public/Private IP Mapping
Conclusion
Losing access to your VDS after installing cPanel and rebooting is usually caused by misconfigured firewall rules or non-persistent network settings. By following the steps above, you can ensure your VDS remains accessible and your cPanel stays operational—even after reboots.