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

  • PeriodicallyPedantic@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    18 minutes ago

    I’m kinda disappointed with this thread, I’m in a similar position to OP, but all the responses are just like “use a reverse proxy and make your URL hard to guess” and other measures which are not very secure. \

    It seems like that’s about as good as you can get at the moment, because the mobile apps barf if you try to add in auth in front of the reverse proxy, but a lot of people seem to be providing this advice like it’s good enough rather than as good as you can get.

      • Evotech@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 hour ago

        I just type the URL

        I have Cloudflare set up without Auth. Just region locked to my country

        So it’s just a solid reverse proxy with a bunch of features and an added layer with white listing.

        I know whitelisting isn’t security per say but it’s good enough

        • PeriodicallyPedantic@lemmy.ca
          link
          fedilink
          English
          arrow-up
          1
          ·
          26 minutes ago

          Idk if geo whitelisting is really good enough. I can’t speak for OP, but I’m in the same position and I don’t. I had high hopes for the post but everyone seems to just brush over the “secure” part

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

    My use cases are:

    • Connect from multiple devices on the same home network (with the application)
    • Connect from a phone device on the internet (with the application)
    • Connect from some PC’s and devices on the internet (with the application and from web browser)

    For home networked devices, I don’t care about security that much. I try to lock it down on the router level and by using VLANs for less secure devices. I connect via IP directly (or .local domain).

    Jellyfin runs under its own user with read access to a media library.

    For devices on the internet, I have jellyfin exposed on a specific url path of my domain - through a reverse proxy all through 443. A bit of security through obscurity here. I’m proxied through cloudflare on the DNS side with very restrictive IP rules.
    I think this is enough for the security flaws jellyfin does have. I’d sleep better at night if it had client certificate support, but Its not a big deal imo. If security flaws allowing remote code execution are found, I’ll shut it down and allow access through wireguard only and lose access from some devices on the internet where I cant use VPNs. Not a bit deal either.

  • nibbler@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    6 hours ago

    If client certificates and basic auth is not supported by jellyfin:

    • reverse proxy
    • strong random subdomain
    • wildcard certificate
    • tls1.3 only
    • doh/dot only

    1-3 make random scanners unable to find your service, 4&5 even hide it from your ISP. Dot/doh service will still know your subdomain, so be your own dot/doh ! :D

    • Jason2357@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      56 minutes ago

      I’m no expert, but an unguessible URL path is similar but not visible to DNS. Could do both.

  • azureskypirate@lemmy.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 hours ago

    As others have mentioned, a reverse proxy, like nginx or caddy. These are web servers, so you need to configure it or an app that runs in it. May I shill: Nginx Proxy Manager (NPM).

  • quips@slrpnk.net
    link
    fedilink
    English
    arrow-up
    8
    ·
    12 hours ago

    A reverse proxy is what you are looking for. I recommend Caddy.

    You’ll also need a domain, but they can be had for very cheap.

  • anon_8675309@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    ·
    14 hours ago

    Another way:

    Expose using caddy. Use basic auth for the web UI only. This exempts the Jellyfin app clients from basic auth that they don’t support but requires it before anyone even gets to the Jellyfin UI. This obfuscates the fact that your endpoint is even a Jellyfin end point.

    • strifegroove@ani.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 hours ago

      How can I do that? I’d love to have better security for my jellyfin but I risk breaking the apps.

  • rumba@lemmy.zip
    link
    fedilink
    English
    arrow-up
    17
    arrow-down
    2
    ·
    18 hours ago

    Run the jellyfin in a container that only has read privileges to the videos ( make sure you can’t get out to your whole NAS from there), put that behind a Cloudflaired tunnel.

    It’s not technically secure, but if they can’t get a foothold in your network and the only thing they can access is your video catalog, that’s a reasonable amount of risk.

    • Bazoogle@lemmy.world
      link
      fedilink
      English
      arrow-up
      11
      ·
      14 hours ago

      Gotta be careful with cloudflared and media. They can block you if they detect copyrighted materials, even if it’s your own DVDs. You can setup TLS certs so the traffic is at least encrypted

        • Bazoogle@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          10 hours ago

          Right. Which is why Cloudflared would block you if it’s detected. But regardless, if for whatever reason, you ended up in court for the content you copied, the judge would probably give you a low fine. Obviously not legal advice, but the US justice system doesn’t have time to care about people making digital copies of DVDs they’ve purchased.

          It’s irrelevant anyway, since none of us are just copying our own DVDs… But for legal reasons /s

  • zaggynl@feddit.nl
    link
    fedilink
    English
    arrow-up
    8
    ·
    19 hours ago

    Ask them to visit https://ipv4.icanhazip.com/ and give you back the number, then whitelist in your webserver, as well as your LAN/VPN range, deny rest. Explain they can only reach jellyfin from their home internet. Repeat if they get 403 forbidden after they get a new WAN IP.

    That or VPN like openziti, wireguard but gets more complicated.

  • BandDad@lemmy.zip
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    22 hours ago

    If anyone has any tips for getting Tailscale running via Docker on my Openmediavault machine, I’m open to it. Everyone lauds it for being dead simple and I cannot for the life of me get it running on the machine it needs to be. Not sure my wife can/will handle anything more complicated.

  • NeryK@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    23 hours ago

    For a remote and non-technical user I would say IP whitelisting offers a decent tradeoff.

    On your end you expose your jellyfin port to internet, but restrict at the router level to your user’s client IP address as soon as you have it. Obviously in practice this works best if the address does not change often.

    • Bazoogle@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      14 hours ago

      Also not as ideal if their ISP uses CGNAT. Still waaay better than fully open, but you would be giving access to many households

      • NeryK@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        8 hours ago

        Yep, that’s why I call that a tradeoff. Far from perfect and yet so much better than nothing.

        Pros:

        • Likely cuts 99.99% of attacks.
        • Nothing to do on client’s end.

        Cons:

        • Whitelisting must be updated everytime the client address changes.
        • Not 100% bulletproof as operators (notably for mobile networks) can NAT multiple connections behind a single publicly addressable IPv4 address.
        • Also IP addresses can be spoofed but I doubt that would be a major concern here.
    • MIDItheKID@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 hours ago

      Is there a way to this with like a MAC address instead of an IP? Allowing specific devices (my parents have a Firestick that they travel with) would be pretty ideal.

  • kcweller@feddit.nl
    link
    fedilink
    English
    arrow-up
    6
    ·
    23 hours ago

    Set up a reverse proxy with https always on. And get a good (physical) firewall, preferably something akin to opnsense, pfsense, openwrt. Exposing is always a risk, and if you do want it, you have to bear the responsibility for your own security. Keep things up to date, set up monitoring and a good logging system (Wazuh) comes to mind.

    Exposure means a security risk. How you deal with that security risk is your choice.

    Cloudflare and the likes forbid usage of their stuff for these things.

    • syaochan@feddit.it
      link
      fedilink
      English
      arrow-up
      4
      ·
      22 hours ago

      How does a reverse proxy helps for security? I mean, the problem here is that exposing Jellyfin on the internet is dangerous: the only way to improve security via a reverse proxy would be mTLS, but I’m not sure how it would work client side.

      • kcweller@feddit.nl
        link
        fedilink
        English
        arrow-up
        4
        ·
        18 hours ago

        By setting up a reverse proxy you redirect the traffic through that specific proxy which means less open ports (basically just 80/443), less monitoring, the ability to easily put a WAF inbetween, etc.

        • nibbler@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 hours ago

          Ports are closed by firewalls, and if you need to port forward on your home router this is a non-issue anyway

      • Flatfire@lemmy.ca
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        19 hours ago

        You’ve got a couple benefits. If you have a domain name, and aren’t advertising it publicly, then you can use the reverse proxy to point that domain to a non-standard port that Jellyfin runs on.

        Security through obscurity is not good security, but it does prevent the majority of port scanning attacks. You can also use fail2ban on the reverse proxy side to try and mitigate some attacks.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    84
    ·
    2 days 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
      21
      ·
      2 days 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/

  • DecentM@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    5
    ·
    23 hours ago

    Not at all, there’s legal risk if you’re hosting your blurays. Cloudflare even explicitly forbids such use. VPN or nothing imo.

    • Bobby@leminal.space
      link
      fedilink
      English
      arrow-up
      5
      ·
      19 hours ago

      Wow, Cloudflare is against piracy? Every single site I’ve ever seen in my life is registered with Cloudflare and uses their DNS with the exception of PTB I believe.

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

        They have to be. They have to at least somewhat comply with laws to avoid lawsuits and fines

        • Bobby@leminal.space
          link
          fedilink
          English
          arrow-up
          1
          ·
          14 hours ago

          Oh, ok, “they have to be” in the same way my seedbox says not to download copyright material. Got it.

      • DecentM@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        10
        ·
        19 hours ago

        Not sure about that, I think it’s more just that they don’t want people streaming terabytes of traffic through their edge.

        • Bobby@leminal.space
          link
          fedilink
          English
          arrow-up
          1
          ·
          18 hours ago

          Well, I don’t know. Cloudflare seems to be the standard, again with that one exception, and the only reason PTB has a different situation is because the founders had a connect.