Assuming the user will not be connecting over vpn, but is both remote and non-technical, how would you expose Jellyfin to them securely?

  • Jean-luc Peak-hard@piefed.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    47 minutes ago

    best practice states security through obscurity is not to be relied upon, but compare ssh logs after one year on the default port vs a non-standard port and you’ll immediately see why you want to use a non-standard https port for non-professional services. it cuts 99.9% of the noise/attempts.

  • 8j1obzlb@piefed.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    55 minutes ago

    I agree with the folks saying reverse proxy of some kind + WAF. That way end users don’t have to deal with the VPN, but your home system is not directly exposed.

    I’ve been doing something similar with SSH local port forwarding and a $5/month VPS. Haven’t come anywhere close to my network quotas, and performance has not been an issue for home use with 2-5 concurrent users most of the time. I forward the local caddy ports to unprivileged ports/user on the VPS, then use the firewall on the VPS to forward that port to 443 and lock down the rest.

  • Depends on what you mean by “secure.” My personal setup is Jellyfin LXC on proxmox --> Wireguard to VPS -> Nginx reverse proxy on VPS.

    This setup relies somewhat on Jellyfin’s auth, but I’m comfortable with that risk. The LXC is blocked from sending local traffic on my network by firewall rules. Yes, someone could exploit a vulnerability in Jellyfin (though looking through the CVEs I’m not overly worried about that), then escape the LXC and fuck with my server. But that’s a lot of work for no profit.

    For more protection (in sense of reducing traffic that even interacts with your server), I’d recommend getting a wildcard cert for the domain so that the actual subdomain jellyfin is on is undisclosed to anyone not using your service.

    Security isn’t about making everything impregnable, it’s about making attacks more trouble than they’re worth. Otherwise, we’d all live in fortified bunkers surrounded by landmines. 🙃

    • eli@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 hour ago

      How much bandwidth is used via the VPS in this instance? I’ve seen most VPS in the USA have a limit of 1TB of bandwidth.

      How many users are you sharing with?

      I know Hetzner does 20TB bandwidth, but that is only EU servers as far as I know.

      • I have a very cheap ($11/yr) us-based vps through racknerd I got via low end box. I’ve got 12 users but only 5 really active ones and I’ve never come close to hitting the 1tb transfer. I serve several services through that one vps (all just reverse proxy to my homelab).

        I did just pick up another u.s. based vps through low end box the other day- $12/yr and unmetered Gbps. 1 CPU only, but a reverse proxy doesn’t need a lot of compute. :)

  • katy ✨@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    3
    ·
    3 hours ago

    if theyre close, add them to your tailscale, if not and you have a web serve, use a reverse proxy.

    for tailscale, you’d probably have to walk them through setting it up but then its one and done

    • WeirdGoesPro@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 hours ago

      That’s basically the VPN solution but with a little more flexibility.

      If you want to actually expose the service, you can use Tailscale to connect it to a VPS and then expose that port to the web with Nginx, but if you do that, be prepared on the security front because…you know…open internet be full of hazards.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    38
    ·
    6 hours ago

    At the very minimum stick a reverse proxy in front like caddy, nginx, or Traefik. Then have some middleware like crowdsec to inspect what’s going on. Then whitelist the IP or the country IP block.

    There is much more but those would be the bare minimum.

    • NarrativeBear@lemmy.world
      link
      fedilink
      English
      arrow-up
      11
      ·
      6 hours ago

      I too would like to know more. Jellyfin has been something that I am still heditating to expose online without a VPN.

      I have Plex behind a reverse proxy (HAproxy) with Crowdsec and firewall rules all behind Cloudflare. My firewall rules in HAproxy block access a few different ways, like if request are higher then 60 requests a second, or if there is strange path traversal. Used the following guide as a start.

      https://www.archy.net/building-a-native-fail2ban-with-haproxy-stick-tables/

  • skeevy_scallops@feddit.online
    link
    fedilink
    English
    arrow-up
    5
    ·
    4 hours ago

    call me crazy but I just use a couldflare tunnel since my domain is already provided through them. They make it really easy to add sub-domains attached to specific ports on the local machine and automatically adds the proper DNS entries. Additionally they have a ton of domain security/anti-bot measures you can set up.

  • SteveTech@aussie.zone
    link
    fedilink
    English
    arrow-up
    5
    ·
    4 hours ago

    Possibly mTLS, which you’d configure in your reverse proxy. You could email them the certificate and instructions on installing it. I believe for Chromium browsers on Windows you basically just double click the cert and click through the wizard. Firefox I know has a thing in the settings for importing the cert. Android you just tap on the cert and make sure it opens with ‘Certificate Installer’ if it gives you the option.

  • INeedMana@piefed.zip
    link
    fedilink
    English
    arrow-up
    5
    ·
    4 hours ago

    If they could be using web UI (I’m not sure how a client would work with auth like that) then it kind of depends on how much hassle they can live with and how secure you want to be

    Simplest would be to use https://doc.traefik.io/traefik/reference/routing-configuration/http/middlewares/basicauth/
    You set up username and password and share those with the user. But it can be brute-forced

    Something more secure but also a bit more demanding would be some kind of email otp
    https://docs.goauthentik.io/add-secure-apps/flows-stages/stages/authenticator_email/
    Set up authentik to send time-limited link to their email that well let them through. But they would have to authenticate every time they access

    • BakedCatboy@lemmy.ml
      link
      fedilink
      English
      arrow-up
      7
      ·
      4 hours ago

      How do you get apps through something like that? Do you have to open your browser and hit the URL periodically to handle auth there and it just remembers your IP?

      • halcyoncmdr@piefed.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 hours ago

        You can set pangolin to allow access to an entire resource or just certain paths without the front auth, instead relying on the built in auth.

        Your random plex/emby/jellyfin server isn’t going to be a huge target and the built in auth is good enough for the limited access your media system should have.

        • BakedCatboy@lemmy.ml
          link
          fedilink
          English
          arrow-up
          1
          ·
          30 minutes ago

          Wait so if you’re gonna allow access without authentication then why bother putting pangolin in front of jellyfin? Does it help in some other kind of way? I don’t really get how it helps without interfering with apps accessing jellyfin.

  • Konraddo@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    3 hours ago

    Ask them to use the Jellyfin web, and you expose it to the public via Netbird / Pangolin locked behind SSO

  • Jul (they/she)@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 hours ago

    Reverse proxy with fail2ban or crowdsec. It’s possible to set up things like Pangolin which ultimately use a VPN between external and internal access points but not at the client, though it takes more setup if you want to use apps over pangolin instead of just the browser.

  • AllYourSmurf@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    6 hours ago

    I agree with reverse proxy + middleware. I’d also suggest something like Jellyswarm as the front end. That way I can connect to other friends’ servers too.

  • Brickfrog@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    4 hours ago

    Adding onto the other comments, if you have admin access to your network router/firewall you can configure the incoming port forward itself to only allow specific IP addresses while dropping traffic from any other internet WAN IPs. It’s a bit like using the Jellyfin whitelist/blacklist but doing it at the network level. This drops all unwanted internet traffic to that port at the firewall before ever reaching the Jellyfin software. Downside is having to occasionally update the firewall whenever there are IP address changes.

    This is probably only feasible if you only have some specific Jellyfin clients in mind to accept connections from, not any random person from any random WAN IP address.

  • Nomecks@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 hours ago

    How much access do you have to their system? I would set up a script on their end to poll https://ipv4.icanhazip.com/ and send you their IP. I would then trigger a firewall rule change on your end to that information. This keeps the access to only their IP, with maybe a few minutes between polls where it might be different.