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

  • Seefoo@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    You can do a reverse proxy + authelia (or other auth service). It’s still more risky than a VPN IMO, buts wayyyy better than some of the other options in this thread

  • PeriodicallyPedantic@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months 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.

    • frongt@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      Well yeah, the “good as you can get” answers are “use a VPN” or “don’t”.

    • KneeTitts@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      Im confused as to what people think the security issue is? Do they think someone will brute force their username and password with a billion queries?

      • mko@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        That’s assuming an attacker will play nice with URL forming and discovering edge cases in POSTing shaped data to the service. Just encrypting is still weak security if the whole front-end web and API surface isn’t hardened.

  • frongt@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    See if there are any apps that will handle the VPN tunneling transparently, then provide the web interface, all in one.

    If you can’t find any that work like you want, I would put an authenticating reverse proxy in front of jellyfin. But last time I tried that, it only half worked. I don’t know if that’s changed.

    Worst case, a reverse proxy that only exposes the necessary endpoints. Or a WAF that can block known attacks.

    In any case, you should have a firewall rule as narrow as possible to only limit access to them. Static IP address if possible, then subnet, then ASN. Whatever is the most restrictive but still works.

  • AllYourSmurf@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months 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.

  • pnelego@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    To be totally honest I’m not sure you can harden jellyfin enough for public Internet exposure without also breaking basic functionality of the platform.

    This is why everyone is always pushing so hard for a VPN/Tailnet of some kind. The public internet is a bit to much of a wild west to be exposing arbitrary services to it unless you really know what you’re doing.

  • Jean-luc Peak-hard@piefed.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months 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.

  • Konraddo@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

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

  • nibbler@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months 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

      • nibbler@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        You telling me jellyfin Clients can’t handle client certs but can port knock?

        My proposal is for maxing ux on the client side while being properly hidden.

          • nibbler@discuss.tchncs.de
            link
            fedilink
            English
            arrow-up
            0
            ·
            3 months ago

            usually port knocking opens the relevant port to the client IP that is knocking. So it makes a lot of sense to have the knocking done by the requesting client. In many situations knocking from your mobile while behind the same NAT as your jellyfin client will do the trick, but if you have different IPv6 on those devices etc, it won’t.

            Also: if you assume your DNS lookups are sniffed - so are your port knocks. If you don’t, spare the extra work. But then, if you like port knocking - keep knocking, nothing wrong about it :D

    • Jason2357@lemmy.ca
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

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

  • 8j1obzlb@piefed.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months 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.

    • FreedomAdvocate@lemmy.net.au
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      With a single year of those VPS costs you could have just bought a plex lifetime pass on sale lol

      Avoiding paying a one off fee or subscription by paying a different subscription for a more complex and worse product is amazing.

    • 8j1obzlb@piefed.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      That said, VPN would be much more manageable if I was trying to really push performance or scale out the network.

  • quips@slrpnk.net
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months 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.

  • Brickfrog@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months 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.

  • Nibodhika@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    Secure is relative, you should be aware that jellyfin itself has security issues https://github.com/jellyfin/jellyfin/issues/5415 most of which are harmless, but at least one is fairly serious and allows people to watch your media without authentication, and adding an extra layer of authentication on the proxy would likely cause issues with clients.

    That being said, if you’re okay with those security issues what I would do is have a cheap VPS, connect both machines to tailscale, and have something like Caddy on the VPS to do the forwarding.

    • exu@feditown.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      Just leaving this here

      Now, let’s address this clearly once and for all. What is possible is unauthenticated streaming. Each item in a Jellyfin library has a UUID generated which is based on a checksum of the file path. So, theoretically, if someone knows your exact media paths, they could calculate the item IDs, and then use that ItemID to initiate an unauthenticated stream of the media. As far as we know this has never actually been seen in the wild. This does not affect anything else - all other configuration/management endpoints are behind user authentication. Is this suboptimal? Yes. Is this a massive red-flag security risk that actively exposes your data to the Internet? No.

      https://github.com/jellyfin/jellyfin/issues/5415#issuecomment-2825240290

      • Nibodhika@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        Except most people have almost the same structure because of media organizers like radarr/sonarr. At the very least they should hide that behind a setting to not require auth (since the header should be there for most clients) so only people running an old client would be affected. They could also add an extra salt to that hash or something similar.

        I agree, it’s not critical, but it shouldn’t be hand waved either. And like I said, security is relative, I would argue for most people this is fine, but I still think this should be taken more seriously.

        • BakedCatboy@lemmy.ml
          link
          fedilink
          English
          arrow-up
          0
          ·
          3 months ago

          Yeah not only would a lot of people have the same media name, because of docker mounts, probably a lot of people have the same path to the media inside of the docker container even if the external location is different. I bet you could make a rainbow table of sorts of the most popular movie/TV torrents combined with the most common place in the container for media to be mounted, then use shodan to get a list of hundreds of instances that you could scan for the common hashes.

          I’m just seeing the issue for the first time and noticed it was raised 5 years ago - surely that was enough time to at least put forward a changeover date and give clients time to update.

          • Flatfire@lemmy.ca
            link
            fedilink
            English
            arrow-up
            0
            ·
            3 months ago

            Jokes on them, my paths are a shitshow and I can’t be bothered to organize them properly

            • BakedCatboy@lemmy.ml
              link
              fedilink
              English
              arrow-up
              0
              ·
              edit-2
              3 months ago

              Do you not do any renaming? That probably would make it even easier as you can just brute force with a database of filenames scraped from torrents. I already have a proof of concept that generates valid jellyfin IDs from any given file path, it only takes a few more steps before you can plug in a shodan scan of jellyfin instances and just shotgun a bunch of IDs generated from torrents.csv at them and find stuff you can stream without authentication.

              People not bothering to rename, using the default radarr naming scheme, or everyone using the same naming pattern from trash guides just makes it easier.

              Probably the only way to guarantee nobody can probe your media and stream it without authentication is to make sure to rename everything using a format that only you use or mount all your media under a path inside docker that contains a long randomly generated folder prefix.

              • Flatfire@lemmy.ca
                link
                fedilink
                English
                arrow-up
                0
                ·
                3 months ago

                I was mostly making the comment in jest. I do rename, but my folder structures, as someone who downloads everything manually based on what I want to watch rather than doing the automated *arr stuff leaves it in directories only I consider sensible.

                I have Jellyfin behind a reverse proxy that lives in a DMZ and a WAF to go with it. I’m sure there’s still room for watching an unauthenticated stream because I forgot to rename a folder somewhere, but it’s not exactly an attack vector I care about. I’m more concerned about DDoS or impersonation attacks, which I also attempt to mitigate via an LDAP implementation behind the scenes.

                It’s not perfect, but it’s the best effort I can make at the moment.

    • FreedomAdvocate@lemmy.net.au
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      Isn’t it hilarious that the best solution to do remote streaming using the free software that people use because they don’t want to pay for a Plex subscription or one-off cost is to pay for at least one subscription, maybe more?

      It’s almost like the reason Plex charge money is because it’s not free to do.

      • Nibodhika@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 months ago

        What Plex does is closer to having an embedded tailscale client, you can access Jellyfin remotely with tailscale for free, but OP specifically asked for no VPN.

        That being said, I’m not opposed to Plex charging for that service, even a tailscale like server costs something to maintain. My gripe with Plex is that it purposefully shoots itself in the foot to force you into their paid service, i.e. it actively tries to isolate itself so you can’t access it remotely, which means that it can’t run inside a docker container unless you give it network host access, otherwise it only considers other docker containers locals and doesn’t let you watch your own content from another machine in the same network.

            • FreedomAdvocate@lemmy.net.au
              link
              fedilink
              English
              arrow-up
              0
              ·
              3 months ago

              Plex server doesn’t need to be “portable”, and running it in docker definitely doesn’t make it easier.

              There absolutely are programs that make sense to run in docker, but Plex server isn’t one of them.

              • Nibodhika@lemmy.world
                link
                fedilink
                English
                arrow-up
                0
                ·
                3 months ago

                Plex server doesn’t need to be “portable”

                Strongly disagree, I’ve switched my media server several times in the past decade for a multitude of reasons, having things in docker has allowed me to do this seamlessly.

                Also you’re ignoring all of the other benefits of running in docker, from isolation to automation.

                and running it in docker definitely doesn’t make it easier.

                Plex is the only self-hosted service that is purposefully trying to block you from being ran in docker. All other things are just much easier to run in docker, that’s part of the appeal, reproducible builds eliminate the “it works on my machine” errors.

                There absolutely are programs that make sense to run in docker, but Plex server isn’t one of them.

                Why do you think it doesn’t make sense? Does Jellyfin make sense to you to run in docker? Why are they different?

                Also, Plex only supports Ubuntu and CentOS, none of which I run on my server, so the only OFFICIAL way to run Plex is Docker.

  • androidul@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    afaik but I’m not sure, Jellyfin lacks support for OIDC AuthN which is a clear sign that you cannot expose this publicly.

    • FreedomAdvocate@lemmy.net.au
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      without a VPN

      Also running all your pirated content traffic through the works biggest internet traffic/service provider is certainly a choice lol

  • anon_8675309@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months 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
      0
      ·
      3 months ago

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