TL;DR: old guy wants logs and more security in docker settings. Doesn’t want to deal with the modern world.

I’m on the sh.itjust.works lemmy instance. I don’t know how to reference another community thread so that it works for everyone, so my apologies for pointing at sh.itjust.works, but my thoughts here are inspired by https://sh.itjust.works/post/54990 and my attempts to set up a Lemmy server.

I’m old school. I’m in my mid-50’s. I was in academia as a student and then an employee from the mid-80’s through most of the 90’s. I’ve been in IT in the private sector since the late 90’s.

That means I was actively using irc and Usenet before http existed. I’ve managed publically facing mail and web servers in my job since the 90’s. I’ve run personal mail and web servers since the early 00’s. I even had a static HTML page that was the number one Google hit for an obscure financial search term for much of the 2000’s. The referer ip’s and search terms could probably have been mined for data.

On the work side, I’ve seen multiple email account compromises. (I’d note zero when it was on premise Lotus Notes. All of the compromises were after moving to O365. Those stopped for years once we moved to MFA, but this year we’ve seen two where the bad actors were able to MitM MFA. That said I don’t regret no longer supporting an on-prem Domino server: https://m.youtube.com/watch?v=Bk1dbsBWQ3k )

I’ve also seen a sophisticated vendor typo squatting email, combined with an internal email compromise cost us significant cash.

Other than email compromise, I’m not aware of any other intrusions. (There are two kinds of companies: those that know they’ve been hacked and those that don’t). I am friends with some IT people in a company where they were ransomwared. I still believe they have a tighter security stack than we do.

I’m paranoid about security because like Farmer’s I’ve seen a thing or two. We keep logs for a year, dumped into a SIEM that is designed to make it unlikely bad actors can get into it even if they take over A/D or VMWare. My home logging is less secure but still extensive. The idea is even if I’m hit, I hope I have the logs to help me understand how and how extensively.

I still have public websites at home, but they don’t contain any content that matters. The only traffic they see is attack attempts and indexers that will index them and then shove them down into oblivion. I’m fine with that.

I still run a mail server at home. It’s mostly used so all my unique email addresses (sh.itjust.works@foo.com) can get forwarded to my personal O365 instance. If I need to reply using a unique address, I use alpine in an ssh session.

Long prolog to explain my experience playing with a Lemmy instance this weekend. I’ve got an xcp-ng instance in the home lab and used it to get a Lemmy docker instance running. It’s not yet exposed to the outside world.

I’m new to docker. I’m new to Lemmy. I’m new to Nginx. (See the “old school” in the title.). At work and at home, I deal with Apache. I’ve got custom mod_rewrite rules and mod_security in place to deal with many attacks. I’m comfortable dealing with the tweaks on both for websites that break because of some rules.

I’ve tried putting an Apache proxy in front of my xcp-ng Lemmy instance, but it won’t work because Lemmy assumes an initial contact via http/1.1 with an http status code of 101 to push to http/2.0. Apache can proxy either but not both. And Lemmy isn’t happy of the initial connection is http/2.0.

I’m also uncomfortable with my lack of knowledge regarding Nginx. I don’t know how to recreate my mod_rewrite rules and I don’t think there’s an equivalent to mod_security.

Worse, I don’t see an easy way to retain docker logs. Yes, I can likely use volumes in a docker-compose.yml to retain them, but it’s far from clear what path that would be.

I know all of these are solveable concerns with some effort, but I suspect few put in that effort.

How do all of you who run containers in a home lab sleep at night knowing all that log data is ephemeral unless you take special effort? How do you sleep knowing the sample configs you are using in containers have little security built in?

  • sunaurus@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 years ago

    I just want to point out that you don’t need to use neither Docker nor nginx to run Lemmy.

    At the end of the day, the really required pieces are:

    1. lemmy_server binary
    2. Lemmy-ui
    3. pict-rs binary
    4. PostgreSQL database

    How you get those things to talk to each other is totally up to you. There’s nothing stopping you from just using Apache as a reverse proxy, for example.

    One possible Dockerless setup is described here: https://join-lemmy.org/docs/en/administration/from_scratch.html. This should give you some idea of how it could be done.

  • blazarious@mylem.me
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    My (short) take on this:

    The whole fediverse lacks security right now compared to how email did in the 90s. This will only become a problem with mass adoption, again, like it did with email.

    Good to start thinking about it early on, though.

  • tekeous@apollo.town
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I use Caddy because it’s more secure than Nginx or Traefik. Keep everything on a separate server - my Lemmy instance is the only thing there, and that’s all you’re gonna get.

    My house is like a fortress, network speaking. I don’t mind so much about logs because you’d have to get past the firewall first. Which is logged. And significantly overbuilt.

    Past that, I don’t really care. If you manage to break into my home network and find my porn stash, hell mate have a copy and wank off, and get lost. Nothing in my server or devices would compromise me.

  • ubergeek77@lemmy.ubergeek77.chat
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 years ago

    How is it ephemeral? My Docker instance for Lemmy logs forever unless I manually clear the logs. My Caddy reverse proxy logs every request too. Both are stored to disk and I’m free to copy them out at any time. They’ll keep increasing in size until I decide to clear them.

    They’re logged through the Docker engine, not the container. A malicious actor would require a sophisticated container breakout attack to even attempt to clear them. Those attacks are rare and highly publicized.

    Alternatively, an attacker could try to find my real instance IP from behind Cloudflare (probably not going to happen), somehow bypass my provider’s firewall which only allows SSH from my home IP (my home is more likely to be broken into than that), and then somehow defeat SSH authentication on top of both of those (quantum computers aren’t quite there yet).

    I’m having trouble seeing the risk you’re concerned about.

  • paco@fedia.io
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    I’m with you. Same vintage IT guy, self hosting similarly. I dunno. I throw a lot of stuff up on my xcp-ng box. Some is important. Some isn’t. I’m doing all manner of old-school firewall and perimeter security and not worrying a ton about logging in my containers. I guess I’m just fatalistic. If I get hacked to the point that I’m digging through logs to figure out what happened, I’m kinda fucked. So I focus more on backup and restore. Can I restore to a known good state? But I hear you. Kids these days with their containers and their pipelines and their devops. Back in my day…

    • phase_change@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      Kids these days with their containers and their pipelines and their devops. Back in my day…

      Don’t get me started about the internal devs at work. You’ve already got me triggered.

      And, I can just imagine the posts they’re making about how the internal IT slows them down and causes issues with the development cycle.