Cloudflared: the shield in front of your applications
How to expose an application from the office server to the internet with no open ports and no public IP, with authentication in front, through Cloudflare Tunnel.
In short
Cloudflare Tunnel, through the cloudflared program installed on the office server, opens an outbound-only connection to the Cloudflare network. The application becomes reachable on a company subdomain with no open ports, no public IP and automatic HTTPS, and Cloudflare Access checks the user before the request reaches it. It is free for up to 50 users.
You have an application running on the office server: a CRM, a document platform, an internal portal. You want to use it from home too, from your phone, from the car. For years, the question “how do I make it reachable from outside?” has had two classic answers, and both have problems.
Port forwarding on the router, possibly with a dynamic DNS service. Simple, but your server becomes visible to everyone. An open port on a public IP is scanned within minutes by bots looking for exactly that: applications with weak passwords, old versions, known vulnerabilities. Every request goes straight to your application, before it asks who you are.
VPN. Sound from a security standpoint, but every user needs a client installed and configured on every device, and on a phone the experience is rarely pleasant. On top of that, more and more business internet plans come without a public IP (so-called CGNAT), in which case neither port forwarding nor a classic VPN works without extra costs.
There is a third option, one we use more and more with our clients: Cloudflare Tunnel, through the cloudflared program.
What cloudflared actually does
cloudflared is a small program you install on the server where the application runs (Windows, Linux or in Docker). Once started, it opens a few connections outbound only, to the Cloudflare network, and keeps them open.
When someone opens crm.your-company.com, the request does not reach you. It reaches Cloudflare, which sends it through the already open connection to cloudflared, and cloudflared hands it to the local application, for example at http://localhost:8080. The response travels the same way back.
The practical consequences:
- No open ports on the router or the firewall. Your server does not answer anything from the internet.
- You do not need a public IP. It works on CGNAT connections and on 4G/5G too.
- Your IP address stays hidden. The world only sees Cloudflare addresses.
- Automatic TLS certificate. The application is served over HTTPS without configuring anything on the server.
It is the same principle we use in Brio Endpoint Manager: the agent on the server initiates the connection outward, not the other way around. There is nothing to attack from outside because there is nothing listening.
The shield itself: the request is checked before it reaches the application
The tunnel solves exposure. The truly valuable part comes from what you put in front of it, in the Cloudflare network:
Cloudflare Access. You define who may open the application: email addresses or whole domains (@your-company.com), sign-in with a Microsoft 365 or Google account, a code received by email. The check happens at Cloudflare, before the request reaches your application. A stranger does not even see the application's login page; they see the Cloudflare login page, which gives them nothing. Access is free for up to 50 users, enough for most of the companies we work with.
DDoS protection and traffic filtering. Cloudflare absorbs volumetric attacks and blocks obviously malicious traffic before it uses up your server's resources. You can add your own rules: block every country except Romania, limit the number of requests per minute from the same address, block known bots.
Access log. You see who opened the application, when and from where, independently of what the application itself records.
The result: an application that, as far as the internet is concerned, exists only for the people you have approved.
What the setup looks like
For an ordinary web application, there are only a few steps and they take an hour:
- The company domain (or a subdomain) is managed through Cloudflare DNS. The free plan is enough.
- In the Cloudflare Zero Trust dashboard you create a tunnel and receive a token.
- You install
cloudflaredon the server as a service, with that token. From then on it starts by itself, at every reboot. - In the dashboard you define the “public hostname” and the local service it leads to:
crm.your-company.com→http://localhost:8080. The DNS record is created automatically. - You create an application in Access with the access policy: who is allowed, with which authentication method, how long the session stays valid.
You change nothing in the application and you do not touch the router. If you want to give it up, you stop the service and the application becomes strictly internal again.
| Port forwarding | VPN | Cloudflare Tunnel + Access | |
|---|---|---|---|
| Port open to the internet | Yes | Yes (the VPN port) | No |
| Requires a public IP | Yes | Yes | No |
| Client installed for the user | No | Yes, on every device | No, browser only |
| Authentication before the application | No | Yes | Yes |
| DDoS protection, traffic filtering | No | No | Yes |
| Cost for a small company | 0 | 0 up to licenses | 0 up to 50 users |
Where it does not fit
We are just as direct about the limits, because it is not a universal solution:
- Traffic passes through Cloudflare. The TLS connection terminates in their network, so Cloudflare can see the content of the requests. For most business applications that is acceptable (Cloudflare acts as a data processor, with a GDPR data processing agreement, and it is used by a considerable part of the internet). If you have a contractual or legal obligation that data must not pass through a third party, stay with a VPN.
- The 100 MB per request limit on the Free and Pro plans. A file upload larger than that is rejected. For applications that work with large files, such as BrioSecureShare, the answer is chunked uploads or direct access from the internal network.
- It is designed for web applications. For remote desktop access, databases or other protocols you need the private network component of Cloudflare Zero Trust, with an installed client, so you partly return to the VPN model.
- You depend on one provider. If the Cloudflare network has a problem, your application is not reachable from outside. Internally, from the office network, it keeps working.
- It does not replace basic hygiene. The application still needs updates, good passwords and backups. The shield stops what comes from outside, not what is already inside.
How we do it
At companies that run Brio CRM, Brio DocForge or Brio Argus on their own server, Cloudflare Tunnel with Access has become the configuration we propose by default when there is no company VPN already. The reason is simple: security is better than with port forwarding, and for users it is simpler than a VPN. They open the browser, sign in once with their Microsoft 365 account and get to work.
For clients with outsourced IT management, we include setting up and monitoring the tunnel in the contract, like the rest of the infrastructure.
If you have an application on the office server that you want to reach securely from anywhere, write to us. We will tell you within a few minutes whether this approach fits your case.
Frequently asked questions
What is cloudflared?
A small program from Cloudflare that you install on the server where the application runs (Windows, Linux or Docker). It opens outbound-only connections to the Cloudflare network and delivers the requests that arrive on your domain to the local application, for example http://localhost:8080. The server does not listen on any port from the internet.
Is Cloudflare Tunnel free?
Yes. The tunnel and Cloudflare Access are free for up to 50 users, provided the domain is managed through Cloudflare DNS, also on the free plan. Above 50 users or for advanced features there are paid plans.
Does it work without a public IP, on CGNAT or on 4G/5G?
Yes. The connection goes from your server to Cloudflare, not the other way around, so it does not matter what IP address you have or whether you are behind CGNAT. You do not need port forwarding and you do not touch the router.
Does it replace the company VPN?
For web applications, yes, and it is simpler for users: a browser and sign-in with a Microsoft 365 or Google account. For remote desktop, databases or other protocols you need the private network component of Cloudflare Zero Trust, with an installed client, so you partly return to the VPN model.
Can Cloudflare see my application's data?
Yes. The TLS connection terminates in the Cloudflare network, so the content of the requests passes through their infrastructure. Cloudflare acts as a data processor, with a GDPR data processing agreement. If you have a contractual or legal obligation that data must not pass through a third party, stay with a VPN.