I Spent Hours Googling Port Forwarding. Then I Found Cloudflare Tunnel
Jenkins
Source: Dev.to | Jan 11, 2026 (UTC)
I have this internal service running on a server behind NAT. Private IP, no public access. The usual nightmare.
My ISP doesn’t give me a static IP. My router’s port forwarding UI looks like it was designed in 2003. And every time I finally get it working, my IP changes and everything breaks.
Then I found Cloudflare Tunnel. Took me 10 minutes to expose my service to the internet with a custom domain. No port forwarding. No static IP needed. Free.
Here’s exactly how I did it.
The Problem
I had a service running on 192.168.39.231:8088. HTTPS with a self-signed cert. I needed to access it from anywhere, ideally at a nice domain like myapp.mydomain.com.
The traditional approach:
Get a static IP (costs money)
Forward ports on your router (pain in the ass)
Set up dynamic DNS (another thing to maintain)
Deal with SSL certs (Let’s Encrypt works but still annoying)
Or just use Cloudflare Tunnel.
Quick Tunnel (The Fast Way)
If you just want to test something quick, there’s a zero-config option:
That’s it. Cloudflared gives you a random URL like alice-ion-married-knights.trycloudflare.com. Your service is now public.
The --no-tls-verify flag is important if your origin has a self-signed cert. Without it, cloudflared refuses to connect because it can’t verify the certificate.
But random URLs suck. Let’s set up a proper custom domain.
Named Tunnel (The Right Way)
You need a Cloudflare account and your domain added to Cloudflare for this.
Step 1: Login
cloudflared tunnel login
Enter fullscreen mode
Exit fullscreen mode
Opens a browser. You authenticate. It downloads a cert to ~/.cloudflared/cert.pem.
Step 2: Create the tunnel
cloudflared tunnel create my-app
Enter fullscreen mode
Exit fullscreen mode
You get output like:
Tunnel credentials written to /root/.cloudflared/8a0b7c44-4677-421e-810b-f5e6de9d0555.json Created tunnel my-app with id 8a0b7c44-4677-421e-810b-f5e6de9d0555
Enter fullscreen mode
Exit fullscreen mode
Save that tunnel ID. You need it.
Step 3: Route your domain
cloudflared tunnel route dns my-app app.yourdomain.com
Enter fullscreen mode
Exit fullscreen mode
This creates a CNAME record in Cloudflare pointing your subdomain to the tunnel.
Залишити відповідь