Skip to content
Impulse SoftwareDOCS
Get modules

ImpulseCpanel

Verified for ImpulseCpanel 1.0.0 ·

Cloudflare protection

The Cloudflare tab lets a customer put their site behind Cloudflare without leaving your client area: protection you manage, from one Cloudflare account and one edge zone of yours, so the customer signs up for nothing and their DNS stays on your nameservers; or their own Cloudflare account, for a customer whose DNS already lives at Cloudflare. The server’s address stays out of sight either way, and an origin lock makes the server refuse anyone who finds it. It is the cPanel form of the same feature in ImpulsePlesk; the two modules can share one edge zone.

Requirement Where
The server agent on each server It installs and runs the connector, writes the per-site include for the lock and the www redirect, and runs the WordPress Toolkit for the address switch.
The connector on each server Operations → Cloudflare Tunnel → Connector on each server → Install connector.
Plan flag Cloudflare Tunnel Plans & Products; Max tunnel hostnames (default 5) caps what one customer may protect. The flag is off on existing plans until you tick it.
One of the two offers switched on Offer Cloudflare protection to customers (managed by you) and/or Customers may connect Cloudflare Tunnel, under Operations → Cloudflare Tunnel, both off by default.

In Cloudflare, once: a domain of its own as the edge zone with its nameservers at Cloudflare; Cloudflare for SaaS enabled on it under SSL/TLS → Custom Hostnames (100 custom hostnames included, the rest billed by Cloudflare per hostname); an API token with Zone › SSL and Certificates › Edit, Zone › DNS › Edit and Account › Cloudflare Tunnel › Edit, scoped to that zone.

Then under ImpulseCpanel → Operations → Cloudflare Tunnel:

  1. Your Cloudflare: tick Offer Cloudflare protection to customers (managed by you), paste the API token, enter the Edge zone, Save and verify. The page confirms the zone and that Cloudflare for SaaS is enabled, or says what to enable.
  2. Connector on each server: Install connector on every server that will carry protected sites (it needs the agent first: a server without one says set up the server agent first).
  3. Each server: Set up creates the server’s tunnel and its origin record in the edge zone and starts the connector. The first server to be set up also sets the zone’s target record and fallback origin; if your Plesk servers already set them, they are adopted, not overwritten. Check now and Remove work as on the Plesk side.

Protected customer hostnames lists every protected site with its status, whether it is locked, and when it was last checked.

The tab leads with Protect your site with Cloudflare. The customer picks the Hostnames to protect (the account’s domains and their www. forms) and clicks Protect my site: one Cloudflare custom hostname per name, that name’s DNS records on the server swapped for a single CNAME to the edge zone (the old records kept to put back), and the site told to take the visitor’s address from Cloudflare. A bare domain is never protected directly — Cloudflare proxies an apex only on its Enterprise plan — so picking one adds its www. form and the site gets a redirect from the bare domain to www ahead of the lock. Protection takes a few minutes (Setting up: DNS, Setting up: certificate, then Active); Check now refreshes it, and the health cron checks every 15 minutes. Turn off protection puts the DNS back and removes the custom hostnames.

Many WordPress sites have their address set to the bare domain and send www visitors there. The tab checks for that first and shows Before you can protect this site: with Protect my site disabled. When the site is a WordPress site the WordPress Toolkit knows, it offers Switch my site’s address to www.…, which changes both WordPress address fields through the toolkit, keeps http or https as it was, flushes the site’s cache and checks again. It changes nothing in DNS or in cPanel.

3. The customer’s own Cloudflare account

Section titled “3. The customer’s own Cloudflare account”

With Customers may connect Cloudflare Tunnel on, the tab offers Connect with an API token (a token with Account › Cloudflare Tunnel › Edit and Zone › DNS › Edit; the module creates the tunnel in the customer’s account, points the chosen hostnames at it and starts the connector) and Use a tunnel token (the customer creates the tunnel in their own dashboard and manages its hostnames there; the tab shows the settings to enter at Cloudflare). Check now, Disconnect and the From Cloudflare health card are on the status card. While a domain goes through Cloudflare, the DNS tab says so and names your nameservers to point back at.

Only reachable through Cloudflare — offered while Customers may make a site reachable only through Cloudflare is on, the default — makes the chosen sites answer a 403 to any visitor who didn’t come through the tunnel, while their real addresses still reach the site’s logs and applications. Turn on (recommended) is available once the tunnel shows Connected; Update sites changes the set; a separate Turn off the lock form leaves the protection or tunnel in place. On the server, the agent writes a per-site include — for the web server cPanel runs, nginx or Apache — with the bare-domain redirect ahead of the lock.

The tunnel-health cron checks every 15 minutes, raises an alert after two failed checks in a row (critical when the lock is on) and emails the customer once per outage. Keep the connector up to date (on by default) upgrades cloudflared on every server once a day; Upgrade now does it on demand. Changes are in ImpulseCore’s audit log for the module under tunnel.* and cfm.* entries, as in ImpulsePlesk.