So everyone is talking about cloudflare tunnels and I decided to give it a shot.

However, I find the learning curve quite hard and would really appreciate a short introduction into how they work and how do I set them up…

In my current infrastructure I am running a reverse proxy with SSL and Authentik, but nothing is exposed outside. I access my network via a VPN but would like to try out and consider CF. Might be easier for the family.

How does authentication work? Is it really a secure way to expose internal services?

Thanks!

  • pz303@kbin.social
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    1 year ago

    @operator

    Cloudflared tunnels are great. No firewall ports to open.

    I installed the Cloudflared docker, which is headless, and fed it my API key. Then Cloudflared creates a VPN between your system and theirs. Then, think of Cloudflare as the reverse proxy, you just configure it on the CF site instead of locally. No need for a reverse proxy on your side.

    I’ve not done anything with auth on it as what I run I don’t mind being public. If you still want to run a local auth, you can set it to hit your local reverse proxy instead and do it that way.

    The benefits are you don’t need to open firewall ports and your local IP is irrelevant so no need for dynamic DNS.

    • Encrypt-Keeper@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      Just a side note that “not opening firewall ports” is not inherently a security benefit if you’re exposing the same service on the same port on the same host anyway via your reverse proxy setup.

      If you were to measure your level of “security” on having ports open or not alone, then using Cloudflare tunnels could be considered worse, since an outbound VPN connection to Cloudflare is essentially circumventing your firewall’s protection entirely, meaning you’re effectively opening all 65,535 TCP and UDP ports instead of one, albeit only to Cloudflare.

      There are benefits to using Cloudflare tunnels but “not opening firewall ports” is not one of them. And you could just as easily accomplish the same thing without Cloudflare by using a VPS and Tailscale with the selfhosted Headscale coordinator.

      • pz303@kbin.social
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Meh, it’s sorta 6 of one and half-dozen of another. The benefit of not opening ports on a firewall isn’t necessarily a security one so much of a convenience one for people who don’t know how their routers work or no access to open those ports. The only security value is it prevents any exploits on your router and a port scan against your network won’t show those ports open. That makes it easier to hide the fact that your hosting something. I’d agree, it’s not a huge security vector to worry about, but can help people not see your real IP which has tangible value.

        Really, your offloading security to CF and putting trust in them to do a better job than you, but as you said, in doing so they can sort of get the keys to your kingdom. I think it’s just worth it with their other tools to block bots and other common exploits that a Netgear home router isn’t looking for.

        The problem with a vps and tailscale is its one more thing to manage and a vps costs money and cf is free.