What’s your go too (secure) method for casting over the internet with a Jellyfin server.

I’m wondering what to use and I’m pretty beginner at this

  • swearengen@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    3
    ·
    26 minutes ago

    I’m just using caddy and a cheap $2 a year .top domain with a $4 a month VPS. Works for my users, I only have 3 users on my server.

  • Decipher0771@lemmy.ca
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 hour ago

    Jellyfin through a traefik proxy, with a WAF as middleware and brute force login protected by fail2ban

  • r00ty@kbin.life
    link
    fedilink
    arrow-up
    10
    ·
    4 hours ago

    Wireguard vpn into my home router. Works on android so fire sticks etc can run the client.

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

    I just use tailscale. I am thinking about external share options but for me and my closests just plain simple tailscale

  • JRaccoon@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    17
    arrow-down
    5
    ·
    edit-2
    5 hours ago

    I see everyone in this thread recommending a VPN or reverse proxy for accessing Jellyfin from outside the LAN. While I generally agree, I don’t see a realistic risk in exposing Jellyfin directly to the internet. It supports HTTPS and certificates nowadays, so there’s no need for outside SSL termination anymore.

    In my setup, which I’ve been running for some time, I’ve port-forwarded only Jellyfin’s HTTPS port to eliminate the possibility of someone ending up on pure HTTP and sending credentials unencrypted. I’ve also changed the Jellyfin’s default port to a non-standard one to avoid basic port-scanning bots spamming login attempts. I fully understand that this falls into the security through obscurity category, but no harm in it either.

    Anyone wanna yell at me for being an idiot and doing everything wrong? I’m genuinely curious, as the sentiment online seems to be that at least a reverse proxy is almost mandatory for this kind of setup, and I’m not entirely sure why.

    • Ptsf@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      ·
      2 hours ago

      It’s difficult to say exactly what all a reverse proxy adds to the security conversation for a handful of reasons, so I won’t touch on that, but the realistic risk of exposing your jellyfin instance to the internet is about the same as handing your jellyfin api over to every stranger globally without giving them your user account or password and letting them do whatever they’d like for as long as they’d like. This means any undiscovered or unintentional vulnerability in the api implementation could easily allow for security bypass or full rce (remote code execution, real examples of this can be found by looking at the history of WordPress), but by siloing it behind a vpn you’re far far far more secure because the internet at large cannot access the apis even if there is a known vulnerability. I’m not saying exposing jellyfin to the raw web is so risky it shouldn’t be done, but don’t buy into the misconception that it’s even nearly as secure as running a vpn. They’re entirely different classes of security posture and it should be acknowledged that if you don’t have actual use for internet level access to jellyfin (external users, etc, etc) a vpn like tailscale or zero tier is 100% best practice.

    • catloaf@lemm.ee
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 hours ago

      The issue is not encryption, it’s the unauthenticated API. People can interact with your server without an account.

    • Domi@lemmy.secnd.me
      link
      fedilink
      English
      arrow-up
      8
      ·
      3 hours ago

      Anyone wanna yell at me for being an idiot and doing everything wrong?

      Not yell, but: Jellyfin is dropping HTTPS support with a future update so you might want to read up on reverse proxies before then.

      Additionally, you might want to check if Shodan has your Jellyfin instance listed: https://www.shodan.io/

    • Novi@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 hour ago

      I don’t disagree, and I am one of the VPN advocates you mention. Generally there is no issue with exposing jellyfin via proxy to the internet.

      The original question seemed to imply an over-secure solution so a lot of over-secure solutions exist. There is good cause to operate services, like jellyfin, via some permanent VPN.

    • makeitwonderful@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      12
      ·
      4 hours ago

      It feels like everything is a tradeoff and I think a setup like this reduces the complexity for people you share with.

      If you added fail2ban along with alert email/notifications you could have a chance to react if you were ever targeted for a brute force attempt. Jellyfin docs talk about setting this up for anyone interested.

      Blocking IP segments based on geography of countries you don’t expect connections from adds the cost of a VPN for malicious actors in those areas.

      Giving Jellyfin its own VLAN on your network could help limit exposure to your other services and devices if you experience a 0day or are otherwise compromised.

      • douglasg14b@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        58 minutes ago

        Fail2ban isn’t going to help you when jellyfin has vulnerable endpoints that need no authentication at all.

    • frezik@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      2
      ·
      4 hours ago

      Nah, setting non-standard ports is sound advice in security circles.

      People misunderstand the “no security through obscurity” phrase. If you build security as a chain, where the chain is only as good as the weakest link, then it’s bad. But if you build security in layers, like a castle, then it can only help. It’s OK for a layer to be weak when there are other layers behind it.

      Even better, non-standard ports will make 99% of threats go away. They automate scans that are just looking for anything they can break. If they don’t see the open ports, they move on. Won’t stop a determined attacker, of course, but that’s what other layers are for.

      As long as there’s real security otherwise (TLS, good passwords, etc), it’s fine.

      If anyone says “that’s a false sense of security”, ignore them. They’ve replaced thinking with a cliche.

    • anonion@lemmy.anonion.social
      link
      fedilink
      English
      arrow-up
      3
      ·
      5 hours ago

      I think the reason why its generally suggested to use a VPN is because it reduces the risk of intrusion to almost zero. Folks that are not network/sys admin savy would feel safer with the lowest risk solution. Using the port forward method, there could be configuration mistakes made which would unintentionally expose a different service or parts of their home network they don’t want exposed. And then there’s the possibility of application vulnerabilities which is less of an issue when only VPN users can access the application. That being said, I do expose some services via port forwarding but that’s only because I’m comfortable with ensuring its secure.

      Reverse proxy is really useful when you have more than one service to expose to the internet because you only have to expose one port. It also automates the certificate creation & simplifies firewall rules inside the home network

    • egonallanon@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 hours ago

      Reverse proxies can be useful for hiding your IP if you do something like host it in a VPS and tunnel the traffic back to your self hosted service. There’s also a lot of documentation on attaching things like fail2ban or crowd sec which can be helpful in reducing the threat from attacks. if you’re running lots of services it can reduce the risk of two apps using the same ports as ultimately everything will go through ports 80 and 443 on the public facing side. Finally again if you’re hosting several services having a central place to manage and deal with cert from can save a lot of time rather than having to wrangle it per service/ server.

    • BakedCatboy@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      5 hours ago

      Imo that’s perfectly fine and not idiotic if you have a static IP, no ISP blocked ports / don’t care about using alt ports, and don’t mind people who find your domain knowing your IP.

      I did basically that when I had a fiber line but then I added a local haproxy in front to handle additional subdomains. I feel like people gravitate towards recommending that because it works regardless of the answers to the other questions, even their security tolerance if recommending access only over VPN.

      I have CGNAT now so reverse proxy in the cloud is my only option, but at least I’m free to reconfigure my LAN or uproot everything and plant it on any other LAN and it’ll all be fine.

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

      Why would you need to expose SSH for everyday use? Or does Jellyfin require it to function?

      Maybe leave that behind some VPN access.

      • WhyJiffie@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        42 minutes ago

        I agree, but SSH is more secure than Jellyfin. it shouldn’t be exposed like that, others in the comments already pointed out why

    • Novi@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      29
      arrow-down
      4
      ·
      6 hours ago

      I would not publicly expose ssh. Your home IP will get scanned all the time and external machines will try to connect to your ssh port.

      • Lucy :3@feddit.org
        link
        fedilink
        English
        arrow-up
        28
        ·
        6 hours ago

        fail2ban with endlessh and abuseipdb as actions

        Anything that’s not specifically my username or git gets instantly blocked. Same with correct users but trying to use passwords or failing authentication in any way.

      • drkt@scribe.disroot.org
        link
        fedilink
        English
        arrow-up
        11
        arrow-down
        2
        ·
        5 hours ago

        They can try all they like, man. They’re not gonna guess a username, key and password.

          • drkt@scribe.disroot.org
            link
            fedilink
            English
            arrow-up
            3
            ·
            2 hours ago

            If you’re going to open something, SSH is far, far more battle-tested than much other software, even popular software. Pragmatically, If someone is sitting on a 0-day for SSH, do you genuinely think they’re gonna waste that on you and me? Either they’re gonna sell it to cash out as fast as possible, or they’ll sit on it while plotting an attack against someone who has real money. It is an unhealthy level of paranoia to suggest that SSH is not secure, or that it’s less secure than the hundreds of other solutions to this problem.

            Here is my IP address, make me eat my words.
            2a05:f6c7:8321::164 | 89.160.150.164

            • pm_me_your_puppies@infosec.pub
              link
              fedilink
              English
              arrow-up
              2
              ·
              44 minutes ago

              You got balls to post you public addresses like that… I mean I agree with you wholeheartedly and I also have SSH port forwarded on my firewall, but posting your public IP is next-level confidence.

              Respect.

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

              I linked a relevant vulnerability, but even ignoring that, pragmatically, you feel they’d be targeting specific targets instead of just what they currently do? (That, by the way, is automating the compromise of vulnerable clients in mass scale to power botnets). Any service you open on your device to the internet is inherently risky. Ssh best practices are, and have been since the early days, not to expose it to the internet directly.

          • fuckwit_mcbumcrumble@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            1
            ·
            12 minutes ago

            In 3 years I haven’t had a single attempted connection that wasn’t me. Once you get to the ephemeral ports nobody is scanning that high.

            I’m not saying run no security or something. Just nobody wants to scan all 65k ports. They’re looking for easy targets.

      • Dataprolet@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        6
        ·
        6 hours ago

        Take a look at Nginx Proxy Manager and how to set it up. But you’ll need a domain for that. And preferably use a firewall of some sort on your server and only allow said ports.

          • Midnight Wolf@lemmy.world
            link
            fedilink
            English
            arrow-up
            7
            ·
            edit-2
            5 hours ago

            This isn’t a guide, but any reverse proxy allows you to limit open ports on your network (router) by using subdomains (thisPart.website.com) to route connections to an internal port.

            So you setup a rev proxy for jellyfin.website.com that points to the port that jf wants to use. So when someone connects to the subdomain, the reverse proxy is hit, and it reads your configuration for that subdomain, and since it’s now connected to your internal network (via the proxy) it is routed to the port, and jf “just works”.

            There’s an ssl cert involved but that’s the basic understanding. Then you can add Some Other Services at whatever.website.com and rinse and repeat. Now you can host multiple services, without exposing the open ports directly, and it’s easy for users as there is nothing “confusing” like port numbers, IP addresses, etc.

            • scoobydoo27@lemmy.zip
              link
              fedilink
              English
              arrow-up
              1
              ·
              3 hours ago

              So I’m another newbie dummy to reverse proxies. I’ve got my jellyfin accessible at jellyfin.mydomain.com but I can only access it through the web. How do I share with other people who want to use the apps? I can’t get my apps to find my instance.

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

        Honestly you can usually just static ip the reverse proxy and open up a 1:1 port mapping directly to that box for 80/443. Generally not relevant to roll a whole DMZ for home use and port mapping will be supported by a higher % of home routing infrastructure than DMZs.

        • cm0002@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          4 hours ago

          It’s beginner level, the hard part is the reverse proxy, once you have a grasp on that just having it on a dedicated box in a segmented portion on your firewall designated as the DMZ is easy. Id even go so far as to say its the bare minimum if you’re even considering exposing to the internet.

          It doesn’t even need to be all that powerful since its just relaying packets as a middleman

  • Gravitywell@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    10
    ·
    5 hours ago

    I rent a cheap $5/mo VPS and use it to run a wireguard server with wgeasy and nginx proxy manager. Everything else runs on my home server connected by wireguard.

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

      I was just trying to get a setup like this going yesterday. I used standard Wiregaurd and got that working between the VPS and home server, but I was trying to set up Caddy as a reverse proxy to direct the incoming traffic through the WG VPN to my services. I wasnt able to figure it out yesterday. Everyone online says Caddy is so simple, but I’m such a noob I just have no idea what it’s doing or how to troubleshoot.

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

        I’ve also really struggled with Caddy despite everyone saying its so simple. I’m pretty new to all this, but I had better luck with Traefik - I now actually have a reverse proxy up and running correctly, which I haven’t been able replicate with Caddy.

        Traefik labels make sense to me in a way Caddy does not.

        • TwiddleTwaddle@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 hours ago

          I appreciate this response. I’ll try booting up traefik later.

          I think Caddy just abstracts things to such a great degree that if you dont already know what it’s supposed to do, it’s harder to learn what you’re doing with it. I’m sure plenty of others have stepped right up and loved the “two line config” without already understanding the basics, but it’s not clicking for me.

    • Machinist0938@piefed.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 hours ago

      Is Nginx Proxy Manager running on the VPS itself and then the proxy routes across the wireguard to your home server? Or is the VPS just port forwarding to your home server which runs the proxy?

      • Gravitywell@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 hours ago

        My goal was to have no ports exposed on my home network so the proxy is on the VPS. My home server connects over wireguad to the vps, then all the traffic is routed over wireguard to the home server which only listens on wireguard.

    • BakedCatboy@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 hours ago

      This is 99% my setup, just with a traefik container attached to my wifeguard container.

      Can recommend especially because I can move apartments any time, not care about CGNAT (my current situation which I predicted would be the case), and easily switch to any backup by sticking my boxes on any network with DHCP that can reach the Internet (like a 4G hotspot or a nanobeam pointed at a public wifi down the road) in a pinch without reconfiguring anything.

  • hietsu@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    12
    ·
    6 hours ago

    Use a reverse proxy (caddy or nginx proxy manager) with a subdomain, like myservice.mydomain.com (maybe even configure a subdir too, so …domain.com/guessthis/). Don’t put anything on the main domain / root dir / the IP address.

    If you’re still unsure setup Knockd to whitelist only IP addresses that touch certain one or two random ports first.

    So security through obscurity :) But good luck for the bots to figure all that out.

    VPN is of course the actually secure option, I’d vote for Tailscale.

      • hietsu@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        4
        ·
        4 hours ago

        Nice, but the bots may not understand the joke.

        And not only that but they will tag the domain with ”there is something here”, and maybe some day someone will take a closer look and see if you are all up-to-date or would there maybe be a way in. So better to just drop everything and maybe also ban the IP if they happen to try poke some commonly scanned things (like /wp-admin, /git, port 22 etc.) GoAccess is a pretty nice tool to show you what they are after.

        • Alk@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 hours ago

          Yeah that’s a good point. The joke is mostly for my own enjoyment or any random user who happens to forget the jellyfin. subdomain.

          I have had a few hits to /wp-admin, but cloudflare actually blocks those for me (I don’t use a tunnel but I do use them for the domain name which helps a bit). I might just shut down the main page then.

      • hietsu@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        5
        ·
        4 hours ago

        Not at hand no, but I’m sure any of the LLMs can guide you through the setup if googling does not give anything good.

        Nothing very special about all this, well maybe the subdir does require some extra spells to reverse proxy config.