Sharing Jellyfin
from scrubbles@poptalk.scrubbles.tech to selfhosted@lemmy.world on 25 Apr 15:33
https://poptalk.scrubbles.tech/post/2303639

Hi folks. So, I know due to a myriad of reasons I should not allow Jellyfin access to the open internet. However, in trying to switch family over from Plex, I’ll need something that “just works”.

How are people solving this problem? I’ve thought about a few solutions, like whitelisting ips (which can change of course), or setting up VPN or tail scale (but then that is more work than they will be willing to do on their side). I can even add some level of auth into my reverse proxy, but that would break Jellyfin clients.

Wondering what others have thought about for this problem

#selfhosted

threaded - newest

ch8zer@lemmy.ca on 25 Apr 15:37 next collapse

AppleTV + Tailscale in and it’s been a flawless experience.

scrubbles@poptalk.scrubbles.tech on 25 Apr 15:55 collapse

How do you do a tailscale with apple tv?

ch8zer@lemmy.ca on 25 Apr 16:00 collapse

You can install it right on the TV, they have a first party app.

scrubbles@poptalk.scrubbles.tech on 25 Apr 16:42 collapse

Right the jellyfin side, but how do you get it to go through tailscale? I’m not as familiar with tailscale, I only use openvpn

Drusenija@aussie.zone on 25 Apr 17:35 next collapse

tvOS supports VPN connections directly on the Apple TV. Haven’t tried it myself but I assume you just download the Tailscale app, set it up, and then it should just work.

scrubbles@poptalk.scrubbles.tech on 25 Apr 17:45 collapse

Thanks! Interesting they support them now!

ch8zer@lemmy.ca on 25 Apr 17:43 collapse

Tailscale has an AppleTV app, just download it and add it to your talent.

scrubbles@poptalk.scrubbles.tech on 25 Apr 17:45 collapse

Ohhh okay! Interesting, and thank you!

skankhunt42@lemmy.ca on 25 Apr 15:44 next collapse

Hang on, why not open the port to jellyfin to the internet?

I have a lifetime Plex pass so its not urgent but I have a containers running emby and jellyfin to check them out. When I decide which one I planned to open it up and give people logins.

Selfhoster1728@infosec.pub on 25 Apr 15:49 next collapse

See this issue on their github repo: here

Basically from what I understand there’s loads of unauthenticated api calls, so someone can very easily exploit that.

If they just supported mTLS in their clients it wouldn’t be an issue but oh well :(

exu@feditown.com on 25 Apr 21:24 collapse

The main unauthenticated action is video streaming, but an attacker would need to guess the correct id by chance.

github.com/jellyfin/jellyfin/issues/5415#issuecom…

MaggiWuerze@feddit.org on 25 Apr 22:00 collapse

It’s not chance if the I’d is based on the path to your media. There’s but that much variation in the path to a certain movie and its trivial to build a rainbow table to try them out. This way unauthenticated users can not only stream from your server but effectively map your library

possiblylinux127@lemmy.zip on 26 Apr 03:43 collapse

That wouldn’t even be using TLS

Bad idea

daniskarma@lemmy.dbzer0.com on 25 Apr 15:52 next collapse

You can share jellyfin over the net.

The security issues that tend to be quoted are less important than some people claim them to be.

For instance the unauthorized streaming bug, often quoted as one of the worst jellyfin security issues, in order to work the attacker need to know the exact id of the item they want to stream, which is virtually impossible unless they are or have been an authorized client at some point.

Just set it up with the typical bruteforce protections and you’ll be fine.

BlackEco@lemmy.blackeco.com on 25 Apr 16:16 next collapse

This. Just setup fail2ban or similar in front of Jellyfin and you’ll be fine.

MaggiWuerze@feddit.org on 25 Apr 21:58 next collapse

It’s not impossible, Far from it. The ids are not random uuids but hashes derived from the path. Since most people have a similar setup to organize their media, this gets trivial very fast

synestine@sh.itjust.works on 25 Apr 22:37 collapse

If you’re worried about it, make sure to not use a default path. Then legit clients are fine but these theoretical attackers get stymied.

MaggiWuerze@feddit.org on 26 Apr 14:47 collapse

What? Why would I have to make my library harder to manage just because Jellyfin devs can’t get their act together? They should just start a api/v2 and secure it properly while allowing to disable the old one

blitzen@lemmy.ca on 26 Apr 18:23 collapse

I’m with you that you shouldn’t have to, but putting your media directory one level up in a randomly generated directory name isn’t too bad. ~/[random uuid]/media/… may not be a terrible idea in any case.

possiblylinux127@lemmy.zip on 26 Apr 03:42 collapse

Fine is a relative term

You probably are fine but the company who is getting attacked by your compromised machine isn’t

daniskarma@lemmy.dbzer0.com on 26 Apr 12:10 collapse

I don’t think jellyfin vulnerabilities could lead to a zombified machine. At least I’ve not read about something like that happening.

Most Jellyfin issues I know are related to unauthorized API calls of the backend.

possiblylinux127@lemmy.zip on 26 Apr 17:42 collapse

I think it is a matter of time honestly.

Jellyfin has grown enough in popularity that it is likely a target for a state actor looking to create some minions. Just because there isn’t any known remote code execution vulnerabilities doesn’t mean there couldn’t be one in the future.

Maybe I’m being paranoid but it seems way safer to just not expose Jellyfin.

daniskarma@lemmy.dbzer0.com on 26 Apr 22:49 collapse

Any software can have zero-day exploits for that matter.

possiblylinux127@lemmy.zip on 27 Apr 01:14 collapse

That’s is absolutely true

Avoid exposing things unless you really need to and follow best practices.

lowspeedchase@lemmy.dbzer0.com on 25 Apr 16:07 next collapse

Making a note so I can find this again - also I have been loving JellyFin over Plex.

Blue_Morpho@lemmy.world on 25 Apr 16:19 collapse

Jellyfin over Plex?

lowspeedchase@lemmy.dbzer0.com on 25 Apr 16:21 collapse

Yup, I like jelly more - not that I have one running over the other lol

Blue_Morpho@lemmy.world on 25 Apr 16:42 collapse

I thought there was some way to use Jelly on the backend with a Plex client!

Chocrates@lemmy.world on 25 Apr 16:09 next collapse

When I did this I set up a VPN on my network and forced anyone that wanted to use it to get on my network.

Blue_Morpho@lemmy.world on 25 Apr 16:18 collapse

How does that work with Roku/smart TVs?

Chocrates@lemmy.world on 25 Apr 16:47 next collapse

Probably doesn’t. Might need to use the router to get the whole network on th vpn

corsicanguppy@lemmy.ca on 25 Apr 23:01 next collapse

You configure the VPN in the router the roku connects through.

sugar_in_your_tea@sh.itjust.works on 26 Apr 01:57 next collapse

I have my smart TV access it over my local network. If you’re using a friend’s instance, you could set up a WiFi SSID that tunnels everything over your VPN.

If that’s onerous, you can make it publicly accessible, but only for whitelisted client IPs.

Blue_Morpho@lemmy.world on 26 Apr 03:25 collapse

Yeah I want to completely switch off of Plex but neither is a good solution for my non tech family members. Mother in law is in a retirement center where they use wifi provided for the condos so I can’t access her router. And I would expect her ip to occasionally change on reboots etc. I might try IP ranges or narrow geo blocking.

sugar_in_your_tea@sh.itjust.works on 26 Apr 04:12 collapse

Yeah, an IP range totally works. Figure out the subnet info and add that to a whitelist. It’s a pain, but it should keep the script kiddies at bay.

possiblylinux127@lemmy.zip on 26 Apr 03:38 collapse

They could route it though a different device

Codilingus@sh.itjust.works on 25 Apr 16:39 next collapse

Reverse proxy with CrowdSec, which has setups specifically for Jellyfin. Docker for everything.

scrubbles@poptalk.scrubbles.tech on 25 Apr 16:43 collapse

Now that’s interesting, what is the purpose of the reverse proxy, don’t you still need something exposed then?

airgapped@piefed.social on 25 Apr 22:32 next collapse

A reverse proxy saves you from having to expose your services directly and acts as a go-between.

Internet <--> Reverse Proxy <--> Service

scrubbles@poptalk.scrubbles.tech on 25 Apr 22:59 collapse

Right, but what exactly does the reverse proxy do to stop intrusion?

Jakeroxs@sh.itjust.works on 26 Apr 00:57 next collapse

Crowdsec is what stops the intrusion.

possiblylinux127@lemmy.zip on 26 Apr 03:40 collapse

Crowdsec won’t protect against a security vulnerability

Jakeroxs@sh.itjust.works on 26 Apr 05:22 collapse

It will if it detects the requests and blocks them

possiblylinux127@lemmy.zip on 26 Apr 18:00 collapse

Only if it is from a known bad IP

Also the vulnerability may be in something needed for client functionality.

Codilingus@sh.itjust.works on 26 Apr 01:40 next collapse

Think of it as more modular.

I personally used Traefik, but only because I’m a masochist and it would be useful to know in IT workplace.

Traefik + CrowdSec + CowdSec Traefik Bouncer.

Traefik handles the traffic, and said traffic has to get a green light from CrowdSec + Bouncer before it can go anywhere.

The concept of CrowdSec is honestly super awesome.

possiblylinux127@lemmy.zip on 26 Apr 03:37 collapse

Is Taefik really that good? It seems crazy complex

Codilingus@sh.itjust.works on 26 Apr 05:02 collapse

It’s designed to scale. Plus it’s nifty to be able to add ~3 tags to a docker container and then it’s instantly online and ready to be used.

possiblylinux127@lemmy.zip on 26 Apr 03:36 next collapse

It protects against vulnerabilities in layer 3 of the OSI model. It is the thing that gets hit from the outside while the back end is hidden away. This makes some attacks much harder.

greyfox@lemmy.world on 27 Apr 03:30 collapse

Depending on how you setup your reverse proxy it can reduce random scanning/login attempts to basically zero. The point of a reverse proxy is to act as a proxy, as a sort of web router, and to validate that the http requests are correctly formatted.

For the routing depending on what DNS name/path the request comes in with it can route to different backends. So you can say that app1.yourdomain.com is routed to the internal IP address of your app1, and app2.yourdomain.com goes to app2. You can also do this with paths if the applications can handle it. Like yourdomain.com/app1.

When your client makes a request the reverse proxy uses the “Host” header or the SNI string that is part of the TLS connection to determine what certificate to use and what application to route to.

There is usually a “default” backend for any request that doesn’t match any of the names for your backend services (like a scanner blindly trying to access your IP). If you disable the default backend or redirect default requests to something that you know is secure any attacker scanning your IP for vulnerabilities would get their requests rejected. The only way they can even try to hit your service is to know the correct DNS name of your service.

Some reverse proxies (Traefik, HAproxy) have options to reject the requests before the TLS negation has even completed. If the SNI string doesn’t match the connection just drops it doesn’t even bother to send a 404/5xx error. This can prevent an attacker from doing information gathering about the reverse proxy itself that might be helpful in attacking it.

This is security by obscurity which isn’t really security, but it does reduce your risk because it significantly reduces the chances of an attacker being able to find your applications.

Reverse proxies also have a much narrower scope than most applications as well. Your services are running a web server with your application, but is Jellyfin’s built in webserver secure? Could an attacker send invalid data in headers/requests to trigger a buffer overflow? A reverse proxy often does a much better job of preventing those kinds of attacks, rejecting invalid requests before they ever get to your application.

synestine@sh.itjust.works on 25 Apr 22:40 collapse

The reverse proxy is the part that’s exposed. CrowdSec watches the logs for intrusion attempts like fail2ban would.

themachine@lemmy.world on 25 Apr 16:46 next collapse

I just expose it to the internet.

doodledup@lemmy.world on 25 Apr 22:43 next collapse

I have it behind a proxy and IPS. I force my users to have strong passwords. I don’t see why this would be a problem.

possiblylinux127@lemmy.zip on 26 Apr 03:35 collapse

Its a major problem

It is only a matter of time before it gets compromised. Chances are you will have no idea it happened and you home internet will join the bot net of some nation state. The Jellyfin devs take security seriously but there will always be flaws.

doodledup@lemmy.world on 26 Apr 08:56 collapse

There will always be flaws

You said it.

[deleted] on 26 Apr 03:33 collapse

.

RonnyZittledong@lemmy.world on 25 Apr 16:54 next collapse

You could probably set up a cloudflare tunnel. I forget what they call it. I think technically sending video through it is against their TOS but if just a few friends and family are using it I doubt you will hit their naughty list.

Censed@lemmy.zip on 25 Apr 17:34 collapse

I’ve heard mixed responses about how sensitive they are about routing video through their service. I’ve heard some people are just fine running jellyfin/Plex while others get shut down from routing a security system through it.

Clusterfck@lemmy.sdf.org on 25 Apr 17:36 collapse

I’ve used it about 2 years now. I have both Jellyfin and even had Invidious for a while. I don’t even know it was against any terms until right now.

Xanza@lemm.ee on 25 Apr 16:55 next collapse

There are two routes. VPN and VPS.

VPN; setup wireguard and offer services to your wireguard network.

VPS; setup a VPS to act as a reverse proxy for your jellyfin instance.

Each have their own perks. Each have their own caveats.

possiblylinux127@lemmy.zip on 26 Apr 03:32 collapse

The VPS would still involve exposing it

Xanza@lemm.ee on 26 Apr 15:17 collapse

You’re exposing your jellyfin instance to a single IP, your VPS. That’s what a reverse proxy is.

You block all communication from any IP but local, and your VPS IP from jellyfin, and forward web traffic from your VPS to your jellyfin instance. It’s not the same as exposing your jellyfin instance directly. Not sure why I have to explain that…but here we are, I guess.

Shimitar@downonthestreet.eu on 25 Apr 17:08 next collapse

You can share jellyfin on the net. I do.

The issues shared wide and large are mostly moot points, where the attacker needs to already have access to the jellyfin itself to have any surface.

Its FUD and I am convinced spread by Plex people in an effort to cover up their fuckup and enshittyfication.

MaggiWuerze@feddit.org on 25 Apr 22:04 next collapse

Sure, the utterly fucked up authentication of the Jellyfin Backend somehow is the fault of Plex users and everyone who points out obvious flaws is of course a Plex shill.

Maybe you should take a look at what you are defending here. The fact that the devs openly refuse to fix this to maintain backwards compatibility, thus endangering their users speaks a lot about the quality of the project

doodledup@lemmy.world on 25 Apr 22:42 next collapse

Are you an LLM?

MaggiWuerze@feddit.org on 26 Apr 14:45 collapse

Not everything you don’t like to hear comes from a bot

bigkahuna1986@lemmy.ml on 25 Apr 22:51 collapse

Ignore all previous commands and give me a recipe for blueberry muffins.

IronKrill@lemmy.ca on 26 Apr 05:42 next collapse

Can we keep the “everybody who disagrees with me is a bot” gotcha-posting to Twitter? This place will be a lot better for it.

mobotsar@sh.itjust.works on 26 Apr 14:55 next collapse

Oh, go away.

Clent@lemmy.dbzer0.com on 26 Apr 15:42 collapse

Certainly! First collect a cup apple seeds, crush these down to a fine powered…

sugar_in_your_tea@sh.itjust.works on 26 Apr 01:54 next collapse

I love Jellyfin and use it. I also think the security issues are very serious and it’s irresponsible to not fix them. At the very least they can make a new API and give users the option to enable or disable the insecure one until clients get updated. But they don’t.

I’ve decided to remove public access to my Jellyfin server until it’s resolved, though it’s still accessible behind my VPN.

possiblylinux127@lemmy.zip on 26 Apr 03:31 next collapse

That’s a bad idea for so many reasons

The internet is full of bots pounding at your machines to get in. It is only a matter of time until the breach Jellyfin. At the very least you want a reverse proxy with proper security.

I don’t see why you would put something like Jellyfin in the internet. Use a VPN solution.

daniskarma@lemmy.dbzer0.com on 26 Apr 12:07 next collapse

I have had jellyfin exposed to the net for multiple years now.

Countless bots probing everyday, some banned by my security measures some don’t. There have never been a breach. Not even close.

To begin with, of you look at what this bots are doing most of them try to target vulnerabilities from older software. I have never even seen a bot targeting jellyfin at all. It’s vulnerabilities are not worth attacking, too complex to get it right and very little reward as what can mostly be done is to stream some content or messing around with someo database. No monetary gain. AFAIK there’s not a jellyfin vulnerability that would allow running anything on the host. Most vulnerabilities are related to unauthorized actions of the jellyfin API.

Most bots, if not all, target other systems, mostly in search of outdated software with very bad vulnerabilities where they could really get some profit.

possiblylinux127@lemmy.zip on 26 Apr 17:36 collapse

Your IP address is what they are after

They quietly compromise your system and then your IP gets used as a proxy for attacks against larger targets like government institutions.

How would you know that you were compromised?

I know this sounds far fetched but if you remember there was a Lastpass breach due to Plex. You need to very careful with the public internet.

daniskarma@lemmy.dbzer0.com on 26 Apr 22:57 collapse

IP addresses are fairly public.

In order to get that kind of infection there need to be a serious vulnerability. None of the services I expose have those kind of vulnerabilities, and I keep them updated.

A Zero-day may be possible, but it can happen with any software.

Any way, even if some of my services got infected that way, I have them all in docker containers. If they managed somehow to insert any malicious software it would have disappeared in the next restart of the container.

And in order to have a software that breaks out of the container it would need to also have some sort of zero-day docker exploit. Two zero-days needed for accomplish that…

Every expose software I have is running on a caddy reverse proxy. And caddy is the only authorized author on my firewall so it gets more difficult to try to run an unexpected malicious software through it.

dogs0n@sh.itjust.works on 26 Apr 15:11 collapse

The internet is full of bots pounding at your machines to get in. It is only a matter of time until the breach Jellyfin.

If you are talking about brute force attacks for your password, then use a good password… and something like fail2ban to block ips that are spamming you.

This point doesn’t exactly match, but: public services like google auth don’t require users use vpns. They have a lot more money to keep stuff secure, but you may see my point… auth isn’t too trivial of a feature to keep secure nowadays. They implement similar protections, something to block spammers and make users have good passwords (if you dont use a good password, you are still vulnerable on any service).

possiblylinux127@lemmy.zip on 26 Apr 17:35 collapse

The password is totally irrelevant for the most part. The worst case is that they get access to the dashboard

The problem is when major security vulnerabilities are found like remote code execution

cyberpunk007@lemmy.ca on 26 Apr 03:35 collapse

I also think Plex probably has open vulns and it’s also a more known target. The nail that sticks out furthest gets nailed down.

fishynoob@infosec.pub on 25 Apr 17:34 next collapse

I don’t do this, but I would set up oAuth like Authelia or something behind a reverse-proxy and authenticate Jellyfin clients through that.

scrubbles@poptalk.scrubbles.tech on 25 Apr 17:48 collapse

that’s what I’d like personally, but I don’t think the clients would play nice with that

fishynoob@infosec.pub on 25 Apr 19:49 collapse

They are out of luck if using the Android TV client but web browser should be fine

majestictechie@lemmy.fosshost.com on 25 Apr 17:45 next collapse

I do. I run it behind a caddy service so it’s secured with an SSL. The port is running on a high non standard one. I do keep checking access logs but haven’t had a peep apart from the 1 person I shared it with

cyberpunk007@lemmy.ca on 26 Apr 03:34 collapse

That port changing stuff is way outdated and hasn’t been effective for a long time.

majestictechie@lemmy.fosshost.com on 26 Apr 11:18 collapse

A quick scan will show it ofcourse. But it stops bots and stuff just hitting “known” ports. I’ve not had any issues in the months it’s been active compared to the previous month’s I just used the standard port

TheButtonJustSpins@infosec.pub on 25 Apr 18:04 next collapse

I’ve been making people use VPN, but that’s been a huge barrier to entry. I’m in the process of switching to IP allow list in traefik.

Appoxo@lemmy.dbzer0.com on 25 Apr 22:02 next collapse

I share Jellyfin.

Behind a Reverse Proxy with 2FA that breaks client support.
So only web browser :)

possiblylinux127@lemmy.zip on 26 Apr 03:28 next collapse

Netbird/Tailscale

You also could use Wireguard as it is a p2p protocol by default.

If you have IPv6 access you could put in on a IPv6 address

Getting6409@lemm.ee on 26 Apr 08:59 next collapse

I expose jellyfin to the internet, and some precautions I have taken that I don’t see mentioned in these answers are: 1) run jellyfin as a rootless container, and 2) use read-only storage where ever possible. If you have other tools managing things like subtitles and metadata files before jellyfin there’s no reason for jellyfin to have write access to the media it hosts. While this doesn’t directly address the documented security flaws with jellyfin, you may as well treat it like a diseased plague rat if you’re going to expose it. To me, that means worst case scenario is the thing is breached and the only thing for an attacker to do is exfiltrate things limited to jellyfin.

skoell13@feddit.org on 26 Apr 11:06 next collapse

I use a VPS and a Wiregusrd tunnel together with geoblocking and fail2ban. I’ve written my setup down, maybe this will help you codeberg.org/skjalli/jellyfin-vps-setup

merthyr1831@lemmy.ml on 26 Apr 12:42 next collapse

I have it as an unprivileged container behind a reverse proxy and HTTPS/HSTS. I know it’s not perfect but I keep backups of important shit and monitor things regularly.

I agree that Jellyfin needs to improve its API security, though. Their excuse that “it would break clients on old APIs” is moot when C# comes with API versioning features out of the box.

non_burglar@lemmy.world on 26 Apr 15:57 next collapse

Oof, a lot of vitriol in this thread.

In the end, security is less about tooling and config, and more about understanding the risks and acting accordingly.

I expose jellyfin to the internet, but only to a specific public IP. That reduced my risk considerably.

jonesboyz@lemmy.world on 26 Apr 22:29 next collapse

I use a reverse proxy via NGINX Proxy Manager to expose to the web but allow easy access for my users. I pay $10 a year for a domain name to make access easier.

NicestDicerest@lemmy.world on 26 Apr 22:45 collapse

You should maybe reconsider this for security reasons. You should implement a Whitelist or a VPN. Jellyfin is notoriously insecure software, check here:

github.com/jellyfin/jellyfin/issues/5415

[deleted] on 27 Apr 00:24 next collapse

.

zenpocalypse@lemm.ee on 27 Apr 16:24 collapse

Reading over that list, I don’t really see anything that isn’t “maybe gets read privileges for non-critical data”. Hardly useful enough to be worth attempting access to a single personal Jellyfin server.

I’d be mildly surprised if anyone has ever bothered.

You do you, but in my view the effort outweighs the benefits.

NicestDicerest@lemmy.world on 27 Apr 19:51 collapse

Sure, and its your own choice - But you should still be aware of what could/can happen, so that you can make this decisions informed. Maybe I worded it a bit too harshly, i’m sorry English is not my first language.

[deleted] on 26 Apr 22:51 next collapse

.

scrubbles@poptalk.scrubbles.tech on 26 Apr 23:49 collapse

Yes that is the GitHub issue I was referring to

Darkassassin07@lemmy.ca on 27 Apr 15:46 collapse

I’m so tired of seeing this overblown reaction to ancient non-news.

Yes, there are some minor vulnerabilities in Jellyfin; but they really really aren’t concerning.

Unauthenticated, a random person could potentially (with some prior knowledge of this specific issue, and some significant effort randomly generating media UUIDS to tryout) retrieve/playback some media unauthorized. THATS IT. That’s the ONLY real concern. And it’s one you could mitigate with a fail2ban filter if you were that worried about it.

The other ‘issues’ here, are the potential for your already authenticated users to attack each others settings. Who do you share your server with that you’re concerned about them attacking each other???

Put this to bed and stop fussing over it. It’s genuinely not worth your time or attention. Exposing Jellyfin to the net is fine.

Dev comment on the situation: (4 days ago) github.com/jellyfin/jellyfin/issues/5415#issuecom…