Security · 2026 · Jasa

Hiding an admin panel behind an email code

An admin panel should not face the open internet. With Cloudflare Access and Tunnel, the remaining risk is locking yourself out.

A different way to defend

The usual way is to open a port and defend it with obscure paths and passwords. Instead, every visit now passes Cloudflare Access first, only allowlisted emails get a code, and traffic reaches the server through a Tunnel.

VisitorEmail codeTunnelAdmin panelDirect access refused
The panel is no longer exposed to the open internet; everyone has to pass an email check first.

Order matters

Set the access policy first, then make the domain live. The other way round leaves the panel exposed for a while. The allowlist also needs an inbox confirmed to work, or the code never arrives and you are locked out.

The traps I hit

In the end it's like changing a lock: make sure the new key opens the door before you remove the old lock.

← All notes