Not every web application is meant for the public internet. Some tools are strictly internal, but still need to be accessible without forcing teams onto VPNs or static IP allowlists.
This is how I used Cloudflare Zero Trust to make an internal web application completely unreachable from the public internet, while keeping access simple and auditable for approved users.
The Goal
- Make the application invisible to the public internet
- Restrict access to approved identities only
- Avoid VPNs and IP allowlists
- Enforce security outside the application code
Step 1: Put the Application Behind Cloudflare Access
The first step was ensuring all traffic to the application passed through Cloudflare.
I created a Self-hosted Access Application scoped specifically to the internal app.
Configuration
- Application type: Self-hosted
- Domain:
or a protected path such as:internal.example.comexample.com/internal*
From this point on, the application could no longer be reached directly from the internet.
Step 2: Define Explicit Access Policies
Zero Trust only works when access rules are explicit.
I created a single allow policy and relied on Cloudflare’s default deny behavior.
Policy logic
- Include:
- Specific user email addresses, or
- Emails ending in
@company.com
- Exclude:
- Everyone else
If a request doesn’t match the policy, Cloudflare blocks it before it ever reaches the application.
Step 3: Enforce Identity-Based Authentication
Instead of managing credentials inside the application, authentication was offloaded to an identity provider.
Cloudflare handles authentication and issues a short-lived session tied to the user’s identity.
Revoking access is instant:
- Remove the user from the identity provider, or
- Update the Access policy
No redeploys. No config changes in the app itself.
Step 4: Add Device Posture Checks
For internal tools, identity alone is often not enough.
I added device posture requirements so access is only granted when users are on trusted devices.
Examples:
- Device is managed
- OS is up to date
- Endpoint security is enabled
- Cloudflare WARP is running
Step 5: Remove Network-Based Trust Completely
There are no trusted networks in this setup.
No VPN. No office IP allowlists. No internal subnets.
Every request is evaluated in real time based on:
- User identity
- Device posture
- Access policy conditions
Final Result
The internal web application is now:
- Completely inaccessible to the public internet
- Reachable only by approved users
- Protected even if credentials are compromised
- Fully auditable through Cloudflare Access logs
Key Takeaway
Internal applications should not rely on secrecy, IP ranges, or network location.
Access should be based on:
Who you are, what device you're using, and whether you should have access right now.
That's the real promise of Zero Trust.