In response to the discussion on a recent thread about whether to trust Cloudflare, as some people are not very comfortable with it terminates HTTPS (MITM).

There is this thing called Fast Reverse Proxy (FRP) https://github.com/fatedier/frp

It’s open source, very lightweight and I have used it in multiple instances. Frankly there doesn’t seem to be a lot of people know/use it here. The idea is you deploy this on a VPS with public IP, and have your server at home connect to it. It is pretty much like your own Cloudflare tunnel, only you have much more control over it (ports, TCP/UDP/HTTP, auth, etc).

I use it on the cheapest VPS ($5) I can find close to where I live. It acts as a simple TCP reverse proxy to my server, where Nginx Proxy Manager handles the actual HTTPS. (You can let FRP handle HTTPS but then you need to think about if you trust the VPS and also keep the certs updated there, so nah.)

It’s developed by a Chinese dude as it is pretty much a necessity for selfhosters (mostly minecraft servers) in China, since Public IP is scarce there and most people live behind CGNATs.

  • HTTP_404_NotFound@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Personally, when I used to route my home services through a VPS- I used a simple VPN tunnel from my VPS to my home network, which my home router would establish (dynamic IP).

    From there, my firewall dictated what was actually allowed to enter through the tunnel… and the reverse proxy, did its thing.

  • garibaldi3489@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    This type of tool is interesting, and provides some of the functionality that Cloudflare Tunnel does, but with frp, a vulnerability in your app (or its login screen) could be more easily exploited since you don’t have the traffic protection features that Cloudflare provides, right? Maybe combining this with fail2ban (or is there another similar self-hosted tool) would not only act as a proxy but also help protect your app to a degree like Cloudflare does?

  • sarkyscouser@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I’m assuming the benefit over say Caddy + Authelia is that you don’t need to open any local ports such as 80 and 443?

  • sinofool@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    What recent thread about trust Cloudflare?

    Tunnel needs a client software, it’s higher risk, larger attack surface than normal http reverse proxy.

    The Cloudflare tunnel feature is part of its zero-trust product. It make sense if you are capable of audit the client source code. If you trust the client as you trust nginx reverse proxy software, tunnel is safer.

    Regular free Cloudflare proxy include basic WAF, it is more useful than selfhosted VPS reverse proxy or fail2ban. These commercial services learn attack patterns much earlier.

    My homelab exposed services all have real HTTPS certs behind Cloudflare. My service is configured trust Cloudflare origin only so attackers cannot bypass WAF. This is also the same setup my workplace setup to protect multi-million transactions.

    If the tunnel is used not for security reason, but bypass CGNAT, it’s at least not worse than selfhosted reverse proxy.

  • p_235615@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Why do you really need this ?

    Why not just set up a VPS and deploy the NginxProxyManager to it together with a wireguard tunnel to your home system.

    You really dont need 2 proxies…

    Or if you want to keep the NPM localy on your home server, then you just setup wireguard on VPS with NAT and port forward to your tunnel.

  • sevlonbhoi1@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I run an oracle free vps with caddy reverse proxy to route traffic to my home server over wireguard/tailscale. Been running this setup from last 4-5 years with zero issues.

  • Zach78954@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I use this and cloudflare. For my normal self hosted app’s cloudflare works great but for stuff that needs a lot of data (Plex) or custom ports I route I through FRP.

  • Tripanafenix@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    My choice was Caddy v2 and wg_easy as well as a Python script which updates the IP if changed automatically. My own dyndns if you will