![]() |
|
Guide CloudPanel Site Security: Block IPs and Bots, Basic Auth and Cloudflare Only - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: CloudPanel (https://adminsforum.com/Forum-cloudpanel) +---- Forum: CloudPanel Guides & Tutorials (https://adminsforum.com/Forum-cloudpanel-guides-tutorials) +----- Forum: CloudPanel Security Guides (https://adminsforum.com/Forum-cloudpanel-security-guides) +----- Thread: Guide CloudPanel Site Security: Block IPs and Bots, Basic Auth and Cloudflare Only (/Thread-guide-cloudpanel-site-security-block-ips-and-bots-basic-auth-and-cloudflare-only) |
CloudPanel Site Security: Block IPs and Bots, Basic Auth and Cloudflare Only - JAY - 10-19-2026 CloudPanel site security: block IPs and bots, password-protect a site and allow Cloudflare only Every site in CloudPanel has its own Security tab. From there you can block abusive IP addresses and bad bots, put a password in front of a staging or development site, and make sure visitors can only reach the site through Cloudflare. All four settings work at the Nginx level, so blocked traffic never reaches PHP or your app. To open it: Sites > Manage (next to your site) > Security. 1. Block an IP address Use this for a single abusive address, for example one that keeps hammering wp-login.php or your contact form.
Blocking single IPs doesn't help much against attacks from many addresses. For those, use Cloudflare (section 4) or the CloudPanel firewall in the Admin Area. 2. Block bad bots Some crawlers ignore robots.txt and waste CPU. You can block them by the name in their User-Agent.
3. Password-protect the site (Basic Authentication) Basic Auth shows a browser login box before anyone can see the site. It's ideal for staging copies, development sites and sites that aren't ready to launch, and it keeps search engines from indexing them.
Things to know:
4. Allow traffic from Cloudflare only If your site runs behind Cloudflare, attackers can still bypass it by sending requests straight to your server's IP. This switch makes the site answer only requests that come through Cloudflare's network.
Cloudflare publishes its IP ranges and changes them from time to time. As root you can refresh the list CloudPanel uses with: Code: clpctl cloudflare:update:ipsWhich option should I use?
Tested on CloudPanel v2.5.4. Sources (checked October 2026): CloudPanel: Site security Related: CloudPanel backups and security: firewall and Basic Auth for the panel |