We Put Cloudflare in Front of an Admin Panel. The Server Was Still Reachable.

November 25, 2026
We Put Cloudflare in Front of an Admin Panel. The Server Was Still Reachable.

We noticed automated password guesses against an admin panel we maintain. We put the site behind Cloudflare and added a Managed Challenge to the admin area. The next check uncovered the more interesting problem: the server hosting the application could still be reached directly.

That meant the same admin panel had two ways in. Requests through the public domain went through Cloudflare. Direct requests reached the origin, the server that runs the actual application, without passing through the challenge. To be clear about what we saw: repeated attempts show that someone was trying to sign in, not that anyone got in.

One login, two paths to the server

Before
Public domain → Cloudflare → Login
Direct request → Origin → Login

After
Public domain → Cloudflare
              → Origin check → Login
Direct request → Origin check
               → Denied

The challenge was doing its job on the public domain. It simply never saw traffic that went straight to the origin. That gap matters when moving an existing site behind a proxy. A DNS record changed today does not make the previous server address disappear from old records or stop a server that still accepts public connections. Cloudflare covers this in its guide to protecting origin servers.

What the Managed Challenge covers

We used a Cloudflare WAF custom rule to challenge browser traffic to the admin area. Here is an illustrative rule expression for a made-up site. It matches the staff entry point and pages beneath it on that hostname.

http.host eq "example.com"
and (
  http.request.uri.path eq "/staff"
  or starts_with(
    http.request.uri.path,
    "/staff/"
  )
)

Set the action to Managed Challenge. Check which routes handle the actual login submission. Some applications display the form on one URL and submit it to a different endpoint. Scope browser challenges around the routes people use, taking care with API calls or callbacks that cannot complete a browser challenge. A separate rate-limiting rule can address repeated submissions to the login endpoint. See Cloudflare’s documentation on custom rules and rate-limiting best practices.

How we dealt with direct requests

We configured Cloudflare to attach a private request header on the way to the server, then made the origin require the expected secret value. A direct request without the value is rejected before the admin login is served. The application’s own sign-in remains in place. The challenge and the origin check do two different jobs.

In this setup the header is a shared secret. Keep it on the server side, use HTTPS between Cloudflare and the origin, and make sure Cloudflare supplies its own value on the forwarded request. A public header name or a value copied into client-side code provides no proof that a request travelled through your configuration. Depending on your hosting, you can also remove public inbound web access with Cloudflare Tunnel or authenticate the proxy connection using Authenticated Origin Pulls. Cloudflare documents both: origin protection options and Authenticated Origin Pulls.

What to verify on a site you manage

  1. Use the public domain as an administrator would. Check the normal login flow as well as the request that submits the form. Confirm that legitimate staff can still get in.
  2. Review your known origin addresses with your host. Include the current hosting address and any previous address or alternate hostname that your team still controls. A direct connection should be rejected before the login form is served.
  3. Check the records for both layers. Cloudflare events tell you what reached Cloudflare. Your origin logs tell you what the server accepted or rejected. Keep the checks in your deployment notes so you can repeat them after a hosting or DNS change.

Once the challenge appears on screen, it is tempting to call the job done. The check that mattered here was the second one: could anyone still reach the same application without going through it? If your hosting and application are managed by different people, ask both who is responsible for restricting direct access. That is a useful starting point for a website security review.

For help moving a site behind the proxy or reviewing an existing configuration, see Cloudflare setup and configuration. It is also worth adding these checks to your website maintenance routine, so they run after every hosting or DNS change. If the site is already down or a critical feature has stopped working, see emergency website and app support.

Back to Blog
WhatsApp Call Email