Live data from Hacker News

Exposing a web service with Cloudflare Tunnel

erisa.dev

41–50 of 186 posts

Re: Exposing a web service with Cloudflare Tunnel

#41
Does anyone know if you can use a Cloudflare tunnel on a single subdomain without using Cloudflare on everything else?

It seemed like I had to run everything on the domain through Cloudflare when I looked into this in the past. That might be fine in the end, but I just wanted to try tunnels out first without committing to anything else.

Edit: thanks, everyone! This was just going to be a tiny web site for hobby purposes at first.

Re: Exposing a web service with Cloudflare Tunnel

#42

I just set up a Cloudflare Tunnel this weekend to my homelab. I was able to connect it up with a container within minutes. I also was able to set up their zero trust offering and had route based RBAC against two domains w/ Google OAuth2 login. I have my reservations about CloudFlare with regard to centralizing the web, but this tunnel is fantastic and saved me quite a bit of trouble with messing with my RouterOs conf…

> I have my reservations about CloudFlare with regard to centralizing the web, but this tunnel is fantastic

Superior UI/UX offered by centralized systems is why everything is being centralized.

People will trade everything including privacy and security for ease of use. The market has shown this time and time again.

Re: Exposing a web service with Cloudflare Tunnel

#43

Does anyone know if you can use a Cloudflare tunnel on a single subdomain without using Cloudflare on everything else? It seemed like I had to run everything on the domain through Cloudflare when I looked into this in the past. That might be fine in the end, but I just wanted to try tunnels out first without committing to anything else. Edit: thanks, everyone! This was just going to be a tiny web site for hobby purpo…

(I work at Cloudflare). You can sign up just a subdomain (sub.foo.xyz) as an enterprise customer and then add an NS records from your DNS provider to Cloudflare for that subdomain.

Tunnels also has a testing domain you can use. It should give you a subdomain like xxx-xxx-xxx.trycloudflare.com for basic "How do I get this thing working" testing.

Re: Exposing a web service with Cloudflare Tunnel

#44
I've been running caddy (with the cloudflare addon) to serve local services on a https url.

I then set my local dns(Adguard home) to redirect my url to it's lan url. Additionally, I run cloudflare tunnel to expose these services on the internet.

This allows me to use the url for internal services both at home or through the internet while having proper auth through cloudflare access when accessed over the internet. It was been working great for me so far

Re: Exposing a web service with Cloudflare Tunnel

#45

I would rather use ngrok for these things: https://ngrok.com/ The reason why is because Alan is awesome.

ngrok is easy to use. Is there any advantage of using Cloudflare Tunnel over ngrok?

Cloudflare tunnels also create multiple connections to Cloudflare for increased reliability. See https://blog.cloudflare.com/argo-tunnels-that-live-forever/

Re: Exposing a web service with Cloudflare Tunnel

#46

Does anyone know if you can use a Cloudflare tunnel on a single subdomain without using Cloudflare on everything else? It seemed like I had to run everything on the domain through Cloudflare when I looked into this in the past. That might be fine in the end, but I just wanted to try tunnels out first without committing to anything else. Edit: thanks, everyone! This was just going to be a tiny web site for hobby purpo…

[deleted]

Re: Exposing a web service with Cloudflare Tunnel

#48

> But what if you could host a web service with no ports exposed? Well, you can! Cloudflare Tunnel makes a persistent outbound connection (a tunnel!) between your server and Cloudflare's nearest datacenter. All the traffic to your domain flows through this outgoing tunnel and connects to your server through the protection of Cloudflare. This also has the benefit of being seamlessly encrypted, so you don't have to wor…

and the fact that all your data will flow through cloudflare and they decide how to use it.

Re: Exposing a web service with Cloudflare Tunnel

#49
post #40

> But what if you could host a web service with no ports exposed? Well, you can! Cloudflare Tunnel makes a persistent outbound connection (a tunnel!) between your server and Cloudflare's nearest datacenter. All the traffic to your domain flows through this outgoing tunnel and connects to your server through the protection of Cloudflare. This also has the benefit of being seamlessly encrypted, so you don't have to wor…

No no, it's encrypted so you can just completely ignore the security of your web service. * Broken auth? Doesn't matter, encrypted. * IDOR? Encryption takes care of it! * Blind SQL or something from the 90s? EEENNNNCCCRRYYPPPTTIIOOONN!

> ... you can just completely ignore the security of your web service

Be weary of such absolute statements -- especially when it comes to security.

Re: Exposing a web service with Cloudflare Tunnel

#50
post #40

> But what if you could host a web service with no ports exposed? Well, you can! Cloudflare Tunnel makes a persistent outbound connection (a tunnel!) between your server and Cloudflare's nearest datacenter. All the traffic to your domain flows through this outgoing tunnel and connects to your server through the protection of Cloudflare. This also has the benefit of being seamlessly encrypted, so you don't have to wor…

No no, it's encrypted so you can just completely ignore the security of your web service. * Broken auth? Doesn't matter, encrypted. * IDOR? Encryption takes care of it! * Blind SQL or something from the 90s? EEENNNNCCCRRYYPPPTTIIOOONN!

They probably use military-grade hashes too. So you know it is very secure indeed.
Post reply on HN