this post was submitted on 01 Sep 2023
79 points (94.4% liked)

Selfhosted

39999 readers
882 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I have a Jellyfin server, NextCloud instance, etc that I share with friends and family. Currently, I serve them over the open-internet using Cloudflare tunnels. Obviously this has some security implications that I don't love. Also recently one of my domains got flagged as malicious by google and now Chrome browsers won't go to the site - annoying.

I use Tailscale already to access my server infra remotely, but honestly I don't see this as a viable option for my non-technical friends and family. Plus, I need to support all kinds of devices like smart tvs. How do you fine folks deal with this issue?

all 40 comments
sorted by: hot top controversial new old
[–] [email protected] 36 points 1 year ago (2 children)

You don't. Unless you want your hobby to turn into a 24/7 support job.

[–] nopersonalspace 7 points 1 year ago

Haha I'm totally fine with that, honestly for me it's a part of the hobby I enjoy!

[–] [email protected] 2 points 1 year ago

Came here to write this. But you already did. 👍

[–] icedterminal 32 points 1 year ago* (last edited 1 year ago) (3 children)

Once you agree to letting friends and family access your hosted services, you become the tech support for any problems. Whether that be your fault, user error, etc. You should absolutely limit who you give access to. In my case, only three people can and that's immediate family. No friends, no extended family. I don't wanna deal with all that mess when I deal with it at work. Don't over extend yourself by being nice.

~~Using Cloudflare is against the ToS when used for services like Jellyfin. Your account can be limited, closed, or find yourself getting a several hundred dollar bill for data usage because you've breached the terms of service. Additionally, streaming content on free accounts incurs higher latency which I've confirmed myself Argo smart routing massively reduces. https://github.com/jellyfin/jellyfin/issues/9295 - Don't abuse what's free or you may lose it.~~

Google shouldn't be indexing your domains anyway. If it's flagged your domain, it's been indexed and scanned. Alternatively, it could indicate you have a weak point somewhere on your server and you've been breached. Google's scan picked up whatever it was. Though I doubt this is the case and just a false positive. Double check your robots.txt files and disallow everything. Most index bots respect this. You can use a community sourced bot blocker. https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker

I've been running my own self hosted services for almost a decade. Though I have a background in IT directly doing this kind of stuff daily at work. As long as you have a strong firewall, modern TLS, relevant security headers, automatic tools like fail2ban, and have a strong grasp on permissions, you should be fine. Before I moved everything to non-root docker, it was given its own service user and SELinux policy. Using direct DNS isn't so much of a problem. You shouldn't have any issues. Feel free to reach out if you have any questions.

[–] [email protected] 10 points 1 year ago (2 children)

RE: CloudFlare TOS, Not anymore. They removed section 2.8 from their TOS, so all content can be served through CloudFlare now, as long as it doesn't use the CDN.

https://blog.cloudflare.com/updated-tos/

[–] icedterminal 2 points 1 year ago* (last edited 1 year ago)

Thanks for the information. Although Argo still greatly reduces latency if a user cares to reduce communication time.

[–] subtext 1 points 1 year ago (1 children)

Can you help me to understand how to bypass the CDN while using Plex?

[–] icedterminal 4 points 1 year ago (1 children)

To bypass their CDN (referred to caching) you need to setup a Page Rule for the entire Plex domain.

https://developers.cloudflare.com/support/page-rules/how-do-i-include-or-exclude-a-specific-url-from-cloudflares-page-rules/

Cache Level set to Bypass for https://plex.mydomain.me/*

[–] subtext 3 points 1 year ago

Awesome, thanks so much for the help!

[–] nopersonalspace 2 points 1 year ago (1 children)

I'm hoping it's just a false positive. I have everything setup to not be indexed, and I just signed up for the google search console (to submit an appeal) and the console confirmed this. I was using cloudflare to block "bots and scrapers" and that seems to have blocked Google's scraper/indexer. My best guess is they might have flagged it just for that, so I've turned it off for now.

As for security, it's an ever-evolving thing but I'm looking at ways to tighten it up. Since everything is behind Cloudflare, I also have them setting up SSL certs, and running firewalls. This lets me auto-ban "known malicious actors", as well as any IP's that aren't geo-located to the US. Server-side, it's not great though. I'm running unraid, which is... not known for it's security. Not sure if there is much I can do about that though until I re-architect everything on a proper server.

[–] icedterminal 1 points 1 year ago* (last edited 1 year ago) (1 children)

You should for sure move away from a proprietary OS. There are many ways to go about it. I personally use Arch minimal with hardened kernel. Everything runs in non-root docker containers. Commonly used distros are Ubuntu and Fedora. But there are many more to choose from. https://distrowatch.com/search.php?category=Server

[–] nopersonalspace 1 points 1 year ago

Yeah, I used to run on proxmox and tried to roll-my-own stuff. I found it to be a lot of work in the areas I was less interested in, if that makes sense. I liked unraid for it's ease of use, although I think in the end the gameplan is still to eventually move docker/applications off of the unraid box and have it be only for storage. Then I can have a regular linux box for all my applications & vms.

[–] SheeEttin 1 points 1 year ago

The Google warning page isn't from a scan. I've seen it show up when visiting an entirely internal site in Chrome. It's not exposed to the Internet, and the domain name doesn't even exist in public DNS.

[–] [email protected] 11 points 1 year ago (1 children)

i have a public ip and my own domain attached to that. i use subdomains for each service and a dashboard on the root domain.

i don't use authelia etc, and rely on the autentication page of each service. but i have fail2ban.

i did help them set up the apps, but they took from there. the dashboard on the root domain helps them navigate all services without having to remember the full url.

[–] nopersonalspace 3 points 1 year ago

Cool, yeah sounds very similar to what I have going on. Seems like this is the way to go

[–] [email protected] 8 points 1 year ago (1 children)

I haven't tried this yet I've only read about it. You can add an authenticator app + reverse proxy in front of HTTP services like Jellyfin. The combination Authelia + Traefik is often mentioned. When the person tries to open up the Jellyfin web app they see an Authelia screen asking for username + password, which when provided goes away and whitelists their public IP for a configurable time period. They don't have to input the user+pass on the TV, they can visit the Jellyfin web app on their phone or laptop, then it will work for all devices behind that public IP. This would allow things like TV sets or Chromecast to work transparently.

[–] nopersonalspace 1 points 1 year ago (1 children)

I use Authentik for SSO, and I think it has some reverse-proxy features built into it. This would be a really interesting idea, I'll look into it. Thanks!

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

I was just reading the Authentik docs the other day, it can do what I described above in a very similar way. It handles the authentication part and delegates the reverse proxy to an actual proxy (nginx, traefik, caddy, envoy etc.) They call it forward authentication.

I'll probably look more into Authentik as well because I'd also like to set up my own Identity Provider (for Tailscale and other things).

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
DNS Domain Name Service/System
HTTP Hypertext Transfer Protocol, the Web
IP Internet Protocol
Plex Brand of media server package
SSH Secure Shell for remote terminal access
SSL Secure Sockets Layer, for transparent encryption
SSO Single Sign-On
TLS Transport Layer Security, supersedes SSL
nginx Popular HTTP server

[Thread #99 for this sub, first seen 1st Sep 2023, 07:25] [FAQ] [Full list] [Contact] [Source code]

[–] [email protected] 3 points 1 year ago

I have a domain which points to my router (over dynamic DNS). My parents' Router connects to my home network via Wireguard using that. All my services have subdomains, for which I have set static DNS records that point to the local address (192.168...) of my server. This way, I only need to expose Wireguard to the public.

[–] NeoNachtwaechter 2 points 1 year ago

My home server is reachable via dynamic DNS. Nextcloud ist running from a VM that has no other ports open and I have done all the security things that the automatic checks have recommended.

Nobody has dared so far to call me malicious.

[–] [email protected] 2 points 1 year ago (2 children)

I share my Home Assistant with family, Nextcloud and Jellyfin with family and friends and websites/blog with the entire world.

I do it with a domain and a subdomain for each service. Each website/service has it's own Let's Encrypt SSL cert managed by Traefik. So all the family members and friends need is the URL and usernames and passwords. Like any other service. I don't know what you did to become flagged as malicious by Google, but my services have run for years without such an issue. So maybe it's just time to switch to a different domain name?

[–] [email protected] 3 points 1 year ago (1 children)

I don’t know what you did to become flagged as malicious by Google

My dynamic public IP recently got flagged by Google and it wouldn't allow logins to any Google accounts coming from my home, even with multiple correct authentication factors. We could connect though the data plan on our phones without a problem because they got (other) IPs from the mobile carrier, but not through the home ISP. We got security emails asking "is this you?" but confirming did nothing. It went away only when the ISP cycled to another of their public ranges.

[–] [email protected] 1 points 1 year ago (1 children)

Might be way off here but have you checked if you actually got hacked and they just didn’t destroy anything?

[–] [email protected] 1 points 1 year ago (1 children)

I would entertain the possibility if there was any sign, or if I knew how Google takes these decisions.

[–] [email protected] 1 points 1 year ago (1 children)

Honestly, I would just take this as an indicator of something fishy going on. Either google crawled your ip and found things it didn’t like or stuff came out of it to google. Either a scripted action (which looks malicious from the outside) or advertising emails. Your logs should at least tell you if there have been any suspicious logins on any of the exposed services.

[–] [email protected] 1 points 1 year ago (1 children)

That's the thing, the only thing I have open to the Internet is a port forwarded SSH with non-root key authentication, into an up-to-date Debian stable. The logs show no attempts. The odds of someone breaking into public key OpenSSH and getting root, with daily security updates, are rather slim IMHO. The router is also an attack surface but it runs up to date OpenWRT.

[–] [email protected] 1 points 1 year ago (1 children)

In this case I‘m out of ideas. :) but thanks for elaborating. I appreciate it.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

No problem, you made a good point.

In any case, my main beef was that relying solely on IP is a pretty shitty way to deal with this on Google's part. They make you jump through hoops and establish over half a dozen ways of proving who you are (user & password, secret question & answer, secondary emails, OTP codes, secondary auth codes, phone SMS, phone confirmation – which are behind phone unlock) and none of that matters when they don't like your current IP? Then what are they for?

[–] [email protected] 1 points 1 year ago

Makes total sense. Good luck figuring it out. :)

[–] nopersonalspace 1 points 1 year ago

I use cloudflare's firewall for some security rules, one of which was to block "known bots/scrapers". This was blocking Google from accessing/scraping my site, and my theory is that they flagged it just because of that. I've turned it off for know, so we'll see.

[–] [email protected] 2 points 1 year ago

How did you get your domain flagged as malicious? Are you on a noip or similar domain?

I don't have any answers for the jellyfish, but I host my seafile on the internet, so my family can access it, and haven't had any issues yet 🤞

[–] [email protected] -2 points 1 year ago (2 children)

In regards to media server, may want to go with Plex over Jellyfin as you will find it much easier for those users who are not as technical and will offer support to far more devices which sounds like what you are looking for.

[–] [email protected] 6 points 1 year ago (1 children)

I don't think that holds true anymore nowadays.

They added so much bloat to Plex that I constantly got asked where is X and do I need to pay for Y? When they started mixing online content with local libraries in all apps things got annoying because my older family members could not differentiate between them. Since there's no server setting for this but only app settings I had to disable them for every device they use. Rinse and repeat every few months when they added another shitty service nobody asked for.

This and that I couldn't access my library without internet connection were the things that drove me to Jellyfin.

[–] nopersonalspace 1 points 1 year ago

Yeah, I had plex forever and I spend way more time on the phone with people trying to explain how to use it's god-awful UI than I ever did on regular tech-suport. Plus it made me cringe every time I had to use it. One day I tried Jellyfin and instantly knew I could never go back.

I'll admit, though, that Plex has better support for more platforms which is super nice.

[–] Weslee 3 points 1 year ago* (last edited 1 year ago)

I'll second this - I found that alot of TVs don't have native jellyfin apps, but they do have Plex.

You can cast from your phone, but my mum found that to be annoying so I just went with Plex