Just created my own zero trust network!
from HurlingDurling@lemmy.world to selfhosted@lemmy.world on 18 Jul 17:55
https://lemmy.world/post/33149242

No awards are needed, just wanted to share my excitement that while my Jellyfin server still keeps loosing my entire library every 24 hours at least now it has a domain and ssl cert!

That is all. Happy Friday everyone

#selfhosted

threaded - newest

Onomatopoeia@lemmy.cafe on 18 Jul 18:01 next collapse

Lol.

Still got the library issue, eh? Gonna have to just turn off services/apps/processes until you find the culprit.

HurlingDurling@lemmy.world on 18 Jul 18:10 collapse

lol, yeah. Gitea is next on the list, but I don’t have much more I’m afraid, Immich and Nextcloud are critical apps for me, so if it isn’t gitea or minecraft, then I might just setup a new server out of an old laptop to be my Jellyfin server and migrate my library there.

Dhs92@piefed.social on 18 Jul 18:29 next collapse

Are you losing your library on reboot?

HurlingDurling@lemmy.world on 18 Jul 19:32 collapse

Not even on reboot, it just get’s deleted somehow, been happening for the past couple of months and I haven’t been able to figure out why yet. I posted all about it here (lemmy.world/post/32756942) if you are interested in reading about it.

gdog05@lemmy.world on 18 Jul 20:54 next collapse

Do you have the media cleanup plugin installed for Jellyfin? I wonder if you change the PUID and/or GUID if you couldn’t make sure Jellyfin wasn’t the source of the deletion.

HurlingDurling@lemmy.world on 18 Jul 21:21 collapse

I don’t have that plugin from what I can tell, and I did not install it manually either. What should I try changing the PUID and GUID to?

gdog05@lemmy.world on 18 Jul 22:09 collapse

I would think the Jellyfin logs would say if it deleted something. But I have to say, I cannot fully understand GUID and PUID in all cases. But you can try to subtract 1 digit from PUID (100 to 99) and then try to delete a show or movie within Jellyfin’s interface. If it won’t do it, then you’ve got the permissions at least where it can’t delete things. It is possible to not view things as well, so it might take some research or trial and error and make sure you write down where it is now. But, it will remove one factor at least.

HurlingDurling@lemmy.world on 19 Jul 03:08 collapse

Finally caught it! It was Jellyfin stupid ass deleting my media!

<img alt="" src="https://lemmy.world/pictrs/image/230506c6-31f6-4bfc-bbc7-2edeb8dc03a7.png">

gdog05@lemmy.world on 19 Jul 04:56 next collapse

Fuck yeah! One issue down, 9,374 to go!

MolochAlter@lemmy.world on 19 Jul 22:02 collapse

Wtf why?

HurlingDurling@lemmy.world on 20 Jul 02:18 collapse

Apparently is a known bug 🙃

keepee@lemmy.world on 20 Jul 06:30 next collapse

Link to bug?

bitwolf@sh.itjust.works on 20 Jul 08:16 collapse

Maybe this

Although it looks like the nasty docker bug link in that thread is fixed.

So maybe ro mounts can mitigate the problem.

MolochAlter@lemmy.world on 20 Jul 07:01 collapse

Jesus that is not a small bug lol

Dultas@lemmy.world on 20 Jul 03:10 collapse

Any de dupe tasks running and removing them since it sees them in a backup?

HurlingDurling@lemmy.world on 20 Jul 16:08 collapse

There where no tasks running outside whatever is setup out of the box when installing jellyfin. I have recently discovered that jellyfin can delete your media if it thinks the media has been removed…

Wierdest logic by the devs.

Onomatopoeia@lemmy.cafe on 18 Jul 18:37 collapse

Can you spin up a VM or a docker image?

I’ve done this when services misbehave, and just migrate the DB over (Syncthing in particular).

HurlingDurling@lemmy.world on 18 Jul 19:33 next collapse

I may try that at some point but work keeps me pretty busy so it may take me a few weeks before I can try.

garshol@infosec.pub on 20 Jul 09:14 collapse

Curious to how syncthing misbehaved. Care to elaborate?

Brkdncr@lemmy.world on 18 Jul 18:33 next collapse

a domain and cert doesn’t equal zero trust network.

chaospatterns@lemmy.world on 18 Jul 22:28 collapse

Right. Zero trust means at the very least you need to add AuthN and AuthZ to every endpoint with no exceptions for internal IP addresses.

vivalapivo@lemmy.today on 18 Jul 18:51 next collapse

I do also have a zero trust network. Zero friends= zero trust

possiblylinux127@lemmy.zip on 18 Jul 18:54 next collapse

You didn’t expose it to the internet right?

If you want remote access setup client certs

BaroqueInMind@piefed.social on 18 Jul 20:29 next collapse

How?

archy@lemmy.world on 18 Jul 21:34 next collapse

Kleopatra

possiblylinux127@lemmy.zip on 19 Jul 05:02 collapse

That isn’t mutualTLS

It just is a frontend for gpg. You need OpenSSL for mutual certs.

tux7350@lemmy.world on 18 Jul 21:45 collapse

Ya got three options.

Option A is to create your own certificate that is self-signed. You will then have to load the certificate into any client you want to use. Easier than people realize, just a couple terminal commands. Give this a go if you want to learn how they work.

Option B is to generate a certificate with Let’s Encrypt via an application like certbot. I suggest you use a DNS challenge to create a wildcard certificate.

Option C is to buy a certificate from your DNS provider aka something like cloudflare.

IMO the best is Option B. Takes a bit to figure it out but its free and rotates automatically which I like.

I like helping and fixing stuff, if you’d like to know anything just ask :D

RunningInRVA@lemmy.world on 18 Jul 21:49 next collapse

None of these are client certificates btw. These are just ways to have your server use TLS encryption with any client that connects but it offers no authorization. If you want authorization with client certificates you need to implement mTLS (Mutual TLS).

tux7350@lemmy.world on 18 Jul 21:58 next collapse

Oooo ya know I actually don’t know about these. I’ve done both A and B for my homelab and C for work.

Any good resources / insight into mTLS? I appreciate the response btw!

RunningInRVA@lemmy.world on 18 Jul 21:59 next collapse

Google?

tux7350@lemmy.world on 18 Jul 22:02 collapse

Well ya know this is a forum and I was trying to engage in a friendly conversation to learn about something you brought up.

But yeah I know how to fucking Google lol

RunningInRVA@lemmy.world on 18 Jul 22:06 collapse

Yes it’s a forum. But just because I corrected your error doesn’t mean I am obligated to do a whole fucking write up for you or go to google myself for you. Grow up.

CybranM@feddit.nu on 19 Jul 16:53 collapse

Then why reply at all? Zero effort is to avoid commenting, maximum effort is trying to answer, “Google?” is wasted effort

RunningInRVA@lemmy.world on 19 Jul 19:53 collapse

Not really. This person should learn to do their own research. They apparently need it.

Confused_Emus@lemmy.dbzer0.com on 19 Jul 21:12 collapse

Who pissed in your cornflakes?

RunningInRVA@lemmy.world on 19 Jul 21:43 collapse

tux7350

Confused_Emus@lemmy.dbzer0.com on 19 Jul 22:05 collapse

I get the impression you’re the type of person who encounters assholes everywhere you go.

possiblylinux127@lemmy.zip on 19 Jul 05:01 collapse

www.youtube.com/watch?v=YhuWay9XJyw

You really should not expose stuff to the internet willy nilly. If you must you need to have extensive monitoring and security controls plus you should understand the application at a deep level.

tux7350@lemmy.world on 20 Jul 00:51 collapse

Ahhh interesting video! I appreciate the post. I see the mTLS is more about authenticating who the client is outside the application.

Don’t worry, Im not just exposing thing willy nilly 🤣 For client-side authentication I use Authentik combined with 2FA, Duo, and fail2ban. Authentik provides identity management through LDAP to jellyfin and any sign in request goes to MFA and you get a Duo notification to approve. You can do other MFA, i just havent set it up.

Ive got a lot of family who use my server. Asking them to install a TSL cert on every machine would be impossible. My method also monitors all sign in requests. Setting up Authentik was a hugggeee game changer for me.

SheeEttin@lemmy.zip on 18 Jul 22:42 collapse

Nor is it authentication.

[deleted] on 18 Jul 22:48 collapse

.

possiblylinux127@lemmy.zip on 19 Jul 04:59 collapse

That is for server side certs not client side. I’m talking about Mutual TLS.

Setting up https is not going to stop bots. All it does is prevent man in the middle attacks. You want to limit who and what can access Jellyfin so that you don’t end up being a victim of an automated exploit.

dataprolet@lemmy.dbzer0.com on 18 Jul 21:43 next collapse

What’s wrong with exposing Jellyfin to the internet?

mic_check_one_two@lemmy.dbzer0.com on 18 Jul 21:49 next collapse

There are a few security issues with it, but all of the worst known issues require a valid login token. So an attacker would already need to have valid login credentials before they could actually do anything bad. Things like being able to stream video without authentication (but it requires already having a list of the stored media on the server, which means you have been logged in before). Or being able to change other users’ settings (but it requires already being logged in to a valid user).

Basically, make sure you use good passwords, and actually trust any other users to do the same.

Dhs92@piefed.social on 19 Jul 04:55 collapse

The bug you mentioned actually just requires the attacker knows your local media paths to generate the hash. The issue is that most people use trash guides to setup *arr which means they probably have the same paths for everything

possiblylinux127@lemmy.zip on 19 Jul 04:56 next collapse

You really shouldn’t expose anything directly to the internet. It is a security problem waiting to happen. (Assuming it hasn’t already)

This is how giant botnets form.

dataprolet@lemmy.dbzer0.com on 19 Jul 07:52 collapse

What security problems?

sugar_in_your_tea@sh.itjust.works on 19 Jul 17:32 collapse

Bots randomly attack stuff, and if you leave something insecure, they’ll install a bot net node.

dataprolet@lemmy.dbzer0.com on 19 Jul 20:07 collapse

Define “insecure”.

sugar_in_your_tea@sh.itjust.works on 19 Jul 22:40 collapse

Default passwords, old insecure versions of apps and system packages, etc. “Just getting it working” usually leaves things insecure, and you usually need to take things a step further to secure your publicly accessible services.

SheeEttin@lemmy.zip on 19 Jul 23:30 collapse

Not just old insecure, but current insecure too. Plenty of stuff runs fully current but still vulnerable code. Put it behind a firewall.

sugar_in_your_tea@sh.itjust.works on 20 Jul 02:36 collapse

Sure. My point is that self-hosters tend to let services sit without updates for months if not years at a time. That’s fine if you don’t expose anything to the internet, so keep that surface area as limited as possible.

smiletolerantly@awful.systems on 19 Jul 05:05 collapse

Nothing. People fearmonger

DieserTypMatthias@lemmy.ml on 20 Jul 09:37 collapse

Why would you expose anything to the internet when you have Tailscale?

tazeycrazy@feddit.uk on 19 Jul 17:44 next collapse

I don’t trust my self with this kind of responsibility.

_core@sh.itjust.works on 20 Jul 02:58 collapse

What did you use for zero trust?

bhamlin@lemmy.world on 20 Jul 08:09 collapse

Why do you want to know? Huh?