Hi y’all, thanks for the help with my question yesterday. I did a bit of homework, and I think I’ve got things figured out. Here’s my revised plan:

  1. configure a cron job to update DuckDNS with my IP address every 5 minutes

  2. use ufw to block all incoming traffic, except to ports 80 and 443, to allow incoming traffic to reach Caddy

  3. configure the Caddyfile to direct traffic from my DuckDNS subdomain to Jellyfin’s port

Does this seem right this time? Am I missing anything, or unnecessarily adding steps? Thanks in advance, I’ll get the hang of all this someday!

  • frongt@lemmy.zip
    link
    fedilink
    English
    arrow-up
    25
    arrow-down
    4
    ·
    2 days ago

    I still don’t recommend putting jellyfin on the Internet. It’s not designed for it. There are some API endpoints you can access without authentication, not to mention potential authentication bypass vulnerabilities.

    5 minutes is also probably too frequent. Leases are usually significantly longer. You might hit a rate limit and get blocked.

    • compostgoblin@lemmy.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      8
      arrow-down
      1
      ·
      2 days ago

      Thanks for the tip! I’ll back the refresh rate off to be safe.

      I’m not sure I entirely understand your concern about putting Jellyfin on the internet. A large part of my interest in selfhosting is being able host my own music library, my own cloud storage, etc, and access it as an alternative to Spotify or Google Drive. Doesn’t that inherently mean that they need to be on the internet, if I want to be able to access them when I’m away from home?

      My goal has been to find a way to do that safely, but if that’s not possible, that’s good to know too, so I don’t keep trying to do the impossible.

      • dogs0n@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        10
        arrow-down
        1
        ·
        edit-2
        1 day ago

        It’s honestly just a matter of how much risk you are comfortable with for using jellyfin on the open internet.

        (If i remember correctly:) The unauthenticated routes thing can only be used for streaming your content without a login (if you can guess the contents ids on your server I believe).

        In my opinion, it’s not worth the hassle of using a vpn because I don’t think this risk is worth mitigating with one.

        But everyone has their own personal risk assesment of course.

        P.s. Easier than a VPN, at least for logging in other users, would be to use some type of proxy authentication like Authelia. I believe jellyfin has a plugin you can use. It can be complicated to setup, but it’s an option. I believe it should protect all routes exposed by jellyfin so that solves the unauthenticated streaming issue. (I still dont think this is necessary but more choice for the risk-adverse!).

        https://github.com/authelia/authelia

        • frongt@lemmy.zip
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          1
          ·
          23 hours ago

          Yes, those are the known vulnerabilities. We don’t know how many unknown vulnerabilities could be discovered in the future.

          • Auli@lemmy.ca
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 hours ago

            And are these the ones they let people see what media I have or are there any serious ones?

          • dogs0n@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            4
            ·
            21 hours ago

            Unfortunately no software exists that is fully perfect in this regard (any program could have multiple bugs just waiting to be found), but jellyfin being open source puts it in a better situation for finding vulnerabilities sooner.

          • ITGuyLevi@programming.dev
            link
            fedilink
            English
            arrow-up
            2
            ·
            20 hours ago

            At least we are more likely to hear about them than we would for PMS. Quickest way to find vulnerabilities is to have as many eyes as possible on it, if you only let the 20 devs you employ look a lot can be missed. Just my opinion though.

      • AbidanYre@lemmy.world
        link
        fedilink
        English
        arrow-up
        14
        arrow-down
        1
        ·
        2 days ago

        Wireguard or tailscale are much better ways of accessing jellyfin from outside your network.

          • cyberwolfie@lemmy.ml
            link
            fedilink
            English
            arrow-up
            3
            ·
            18 hours ago

            I use Nginx Proxy Manager and whitelist my remote users. They all have static IPs though, so its a workable solution for me.

            Before I used a whitelist I would go through the access logs, and could never find any attempts to exploit the endpoints - only some random bots trying to find some admin page assuming it was another service. Not saying you shouldn’t take it seriously, but you are likely not subject to these attacks the moment you expose it.

            That said, there is a discussion about these endpoints on their repo. At some point they will be fixed (my impression is that they are hampered by legacy Emby code). When they do, you could do this more securely.

          • frongt@lemmy.zip
            link
            fedilink
            English
            arrow-up
            6
            arrow-down
            2
            ·
            2 days ago

            Provide them with VPN access. If that’s too much for them, then they don’t get access. Tough. On the scale of security vs convenience, that’s nothing.

            If you really really want, you should at least see if you can put a WAF in front, and put the server itself somewhere it doesn’t have access to the rest of your network (a DMZ) so that if and when it gets hacked, it doesn’t compromise the entire network.

          • ExperiencedWinter@lemmy.world
            link
            fedilink
            English
            arrow-up
            4
            arrow-down
            1
            ·
            2 days ago

            I highly recommend Tailscale, you can share machines/services with unlimited friends on the free tier, and all of the actual auth stuff is handled by someone who isn’t me.

            • Auli@lemmy.ca
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 hours ago

              What vulnerabilities? Sure there are some but nothing massive that I have seen. Care to post them.

    • FreedomAdvocate@lemmy.net.au
      link
      fedilink
      English
      arrow-up
      7
      arrow-down
      8
      ·
      2 days ago

      It’s not designed for it

      Yet everyone in here tells everyone to switch from Plex, which is designed for it, to jellyfin lol