106
submitted 2 months ago* (last edited 2 months ago) by Maroon@lemmy.world to c/selfhosted@lemmy.world

I understand that people enter the world of self hosting for various reasons. I am trying to dip my toes in this ocean to try and get away from privacy-offending centralised services such as Google, Cloudflare, AWS, etc.

As I spend more time here, I realise that it is practically impossible; especially for a newcomer, to setup any any usable self hosted web service without relying on these corporate behemoths.

I wanted to have my own little static website and alongside that run Immich, but I find that without Cloudflare, Google, and AWS, I run the risk of getting DDOSed or hacked. Also, since the physical server will be hosted at my home (to avoid AWS), there is a serious risk of infecting all devices at home as well (currently reading about VLANS to avoid this).

Am I correct in thinking that avoiding these corporations is impossible (and make peace with this situation), or are there ways to circumvent these giants and still have a good experience self hosting and using web services, even as a newcomer (all without draining my pockets too much)?

Edit: I was working on a lot of misconceptions and still have a lot of learn. Thank you all for your answers.

you are viewing a single comment's thread
view the rest of the comments
[-] dogsnest@lemmy.world 14 points 2 months ago

...maybe use a reverse proxy...

+1 post.

I would suggest definitely reverse proxy. Caddy should be trivial in this use case.

cheers,

[-] atzanteol@sh.itjust.works 5 points 2 months ago

Reverse proxies don't add security.

[-] dogsnest@lemmy.world 11 points 2 months ago* (last edited 2 months ago)

lol

eta:

Is it ok if I cite f5.com over some.random.lemmy.dude?

Who is f5.com?

[-] Guadin@k.fe.derate.me 10 points 2 months ago

I don't get why they say that? Sure, maybe the attackers don't know that I'm on Ubuntu 21.2 but if they come across https://paperless.myproxy.com and the Paperless-NGX website opens, I'm pretty sure they know they just visited a Paperless install and can try the exploits they know. Yes, the last part was a bit snarky, but I am truly curious how it can help? Since I've looked at proxies multiple times to use it for my selfhosted stuff but I never saw really practical examples of what to do and how to set it up to add an safety/security layer so I always fall back to my VPN and leave it at that.

[-] Auli@lemmy.ca 3 points 2 months ago

Not every path is mapped with the reverse proxy.

[-] atzanteol@sh.itjust.works 2 points 2 months ago* (last edited 2 months ago)

I'm positive that F5's marketing department knows more than me about security and has not ulterior motive in making you think you're more secure.

Snark aside, they may do some sort of WAF in addition to being a proxy. Just "adding a proxy" does very little.

[-] dogsnest@lemmy.world 1 points 2 months ago

So, you've gone from:

reverse proxies don't add security

to:

"adding a proxy" does very little

What's next?

Give up. You don't know what the fuck you're talking about.

[-] atzanteol@sh.itjust.works 1 points 2 months ago
[-] dogsnest@lemmy.world 1 points 2 months ago
[-] atzanteol@sh.itjust.works 1 points 2 months ago

No point talking to you then.

[-] dogsnest@lemmy.world 1 points 2 months ago

lol

reverse proxies don't add security

Citation?

[-] ShellMonkey@lemmy.socdojo.com 7 points 2 months ago* (last edited 2 months ago)

I have a dozen services running on a myriad of ports. My reverse proxy setup allows me to map hostnames to those services and expose only 80/443 to the web, plus the fact that an entity needs to know a hostname now instead of just an exposed port. IPS signatures can help identify abstract hostname scans and the proxy can be configured to permit only designated sources. Reverse proxies also commonly get used to allow for SSL offloading to permit clear text observation of traffic between the proxy and the backing host. Plenty of other use cases for them out there too, don't think of it as some one trick off/on access gateway tool

[-] atzanteol@sh.itjust.works 5 points 2 months ago

My reverse proxy setup allows me to map hostnames to those services and expose only 80/443 to the web,

The mapping is helpful but not a security benefit. The latter can be done with a firewall.

Paraphrasing - there is a bunch of stuff you can also do with a reverse proxy

Yes. But that's no longer just a reverse proxy. The reverse proxy isn't itself a security tool.

I see a lot of vacuous security advice in this forum. "Install a firewall", "install a reverse proxy", etc. This is mostly useless advice. Yes, do those things but they do not add any protection to the service you are exposing.

A firewall only protects you from exposing services you didn't want to expose (e.g. NFS or some other service running on the same system), and the rproxy just allows for host based routing. In both cases your service is still exposed to the internet. Directly or indirectly makes no significant difference.

What we should be advising people to do is "use a valid ssl certificate, ensure you don't use any application default passwords, use very good passwords where you do use them, and keep your services and servers up-to-date".

A firewall allowing port 443 in and an rproxy happily forwarding traffic to a vulnerable server is of no help.

[-] ShellMonkey@lemmy.socdojo.com 3 points 2 months ago

They're a part of the mix. Firewalls, Proxies, WAF (often built into a proxy), IPS, AV, and whatever intelligence systems one may like work together to do their tasks. Visibility of traffic is important as well as the management burden being low enough. I used to have to manually log into several boxes on a regular basis to update software, certs, and configs, now a majority of that is automated and I just get an email to schedule a restart if needed.

A reverse proxy can be a lot more than just host based routing though. Take something like a Bluecoat or F5 and look at the options on it. Now you might say it's not a proxy then because it does X/Y/Z but at the heart of things creating that bridged intercept for the traffic is still the core functionality.

[-] Auli@lemmy.ca 1 points 2 months ago* (last edited 2 months ago)

You can’t port map the same port to different services on a firewall. Reverse proxy lets you open one port and have multiple services on it. Firewall can protect exposed services one I geoip block every country but my own two use crowded to block what they consider malicious ips.

[-] d_ohlin@lemmy.world 5 points 2 months ago* (last edited 2 months ago)

May not add security in and of itself, but it certainly adds the ability to have a little extra security. Put your reverse proxy in a DMZ, so that only it is directly facing the intergoogles. Use firewall to only expose certain ports and destinations exposed to your origins. Install a single wildcard cert and easily cover any subdomains you set up. There's even nginx configuration files out there that will block URL's based on regex pattern matches for suspicious strings. All of this (probably a lot more I'm missing) adds some level of layered security.

[-] atzanteol@sh.itjust.works 5 points 2 months ago* (last edited 2 months ago)

Put your reverse proxy in a DMZ, so that only it is directly facing the intergoogles

So what? I can still access your application through the rproxy. You're not protecting the application by doing that.

Install a single wildcard cert and easily cover any subdomains you set up

This is a way to do it but not a necessary way to do it. The rproxy has not improved security here. It's just convenient to have a single SSL endpoint.

There’s even nginx configuration files out there that will block URL’s based on regex pattern matches for suspicious strings. All of this (probably a lot more I’m missing) adds some level of layered security.

If you do that, sure. But that's not the advice given in this forum is it? It's "install an rproxy!" as though that alone has done anything useful.

For the most part people in this form seem to think that "direct access to my server" is unsafe but if you simply put a second hop in the chain that now you can sleep easily at night. And bonus points if that rproxy is a VPS or in a separate subnet!

The web browser doesn't care if the application is behind one, two or three rproxies. If I can still get to your application and guess your password or exploit a known vulnerability in your application then it's game over.

[-] zingo@lemmy.ca 3 points 2 months ago

The web browser doesn't care if the application is behind one, two or three rproxies. If I can still get to your application and guess your password or exploit a known vulnerability in your application then it's game over.

Right!?

Your castle can have many walls of protection but if you leave the doors/ports open, people/traffic just passes through.

[-] Auli@lemmy.ca 1 points 2 months ago

So I’ve always wondered this. How does a cloudflare tunnel offer protection from the same thing.

[-] atzanteol@sh.itjust.works 2 points 2 months ago

They may offer some sort of WAF (web application firewall) that inspects traffic for potentially malicious intent. Things like SQL injection. That's more than just a proxy though.

Otherwise, they really don't.

[-] Oisteink@feddit.nl 2 points 2 months ago* (last edited 2 months ago)

A reverse proxy is used to expose services that don't run on exposed hosts. It does not add security but it keeps you from adding attack vectors.

They usually provide load balancing too, also not a security feature.

Edit: in other words what he’s saying is true and equal to “raid isn't baclup”

this post was submitted on 26 Jun 2024
106 points (100.0% liked)

Selfhosted

39251 readers
156 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