![]() |
|
Guide CyberPanel Firewall Explained: Default Ports, Adding Rules, Avoiding Lockouts - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: CyberPanel (https://adminsforum.com/Forum-cyberpanel) +---- Forum: CyberPanel Guides & Tutorials (https://adminsforum.com/Forum-cyberpanel-guides-tutorials) +----- Forum: CyberPanel Security Guides (https://adminsforum.com/Forum-cyberpanel-security-guides) +----- Thread: Guide CyberPanel Firewall Explained: Default Ports, Adding Rules, Avoiding Lockouts (/Thread-guide-cyberpanel-firewall-explained-default-ports-adding-rules-avoiding-lockouts) |
CyberPanel Firewall Explained: Default Ports, Adding Rules, Avoiding Lockouts - JAY - 10-24-2026 CyberPanel Firewall Explained: Default Ports, Adding Rules, Avoiding Lockouts CyberPanel switches on a firewall during install (it uses firewalld underneath) and opens the ports its services need. Everything else is blocked. This guide shows what's open by default, how to add or restrict rules, and the two mistakes that lock people out. Watch it: Part 10 of the CyberPanel course, Security & Updates This is Part 10 of 10 in our free CyberPanel Full Course. The written steps below go into more detail. Where to find it Open Security > Firewall. The status, the Add Rule form and the default rules are all on one page: Firewall Status shows ON or OFF, with Start, Stop and Reload buttons. Leave it ON. The default rules On a fresh install you get 15 rules, all open to everyone ( Code: 0.0.0.0/0
Code: firewall-cmd --list-allCode: services: dhcpv6-client ftp sshCode: firewall-cmd --list-rich-rulesAdd a rule Fill in the row above the table:
Lock the panel to your own IP The most useful change: allow 8090 only from your office or home IP.
Code: firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="NEW-IP" port port="8090" protocol="tcp" accept' && firewall-cmd --reloadClose what you don't use Not using FTP? Delete ftp and ftptls. Not hosting DNS on this server? Delete the two dns rules. Fewer open ports means less to attack. Don't remove the mail ports if you send or receive mail here. Two ways people lock themselves out
Code: firewall-cmd --list-allCode: systemctl stop firewalldFirewall vs ModSecurity and Imunify The firewall only decides which ports are reachable. Attacks on your websites over port 80/443 (SQL injection, bad bots) are handled by a web application firewall. CyberPanel offers ModSecurity and Imunify under the same Security menu. That's a separate guide. More CyberPanel guides
Tested on CyberPanel 3.0 (build 8, OpenLiteSpeed edition) on Ubuntu 24.04, October 2026. Menu names can change slightly between versions. |