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.
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
- One command took a DNS record with it. After an overwriting DNS command failed, a verification TXT record was gone. Exporting records first brings real peace of mind.
- I blocked direct access before the new route worked. The site briefly returned 403. Confirm the new route first, then close the old one.
- What your machine sees is not what the world sees. Proxies and DNS caches can keep a computer on the old address. When debugging, query authoritative DNS directly.
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