I find the idea of self-hosting to be really appealing, but at the same time I find it to be incredibly scary. This is not because I lack the technical expertise, but because I have gotten the impression that everyone on the Internet would immediately try to hack into it to make it join their bot net. As a result, I would have to be constantly vigilant against this, yet one of the numerous assailants would only have to succeed once. Dealing with this constant threat seems like it would be frightening enough as a full-time job, but this would only be a hobby project for me.

How do the self-hosters on Lemmy avoid becoming one with the botnet?

  • bizdelnick@lemmy.ml
    link
    fedilink
    English
    arrow-up
    8
    ·
    7 hours ago

    By default your OS is secure. You only have to think about what you expose and how can it be broken in. Disable SSH password authentication. Don’t run software that is provided by hobbyists who have no enough security expertise (i. e. random github projects with 1 or 2 contributors and any software that recommends install method curl <something> | sudo bash). Read how to harden the services you run, if it is not described in the documentation — avoid such services. Ensure that services you installed are not running under root. Better use containerized software, but don’t run anything as root even inside containers. Whenever possible, prefer software from your distro official repos because maintainers likely take care about safe setup even if upstream developers don’t. Automate installing security updates at the day they released.

    What doesn’t help:

    • Security through obscurity. Changing SSH port etc. Anyone can scan open ports and find where SSH is listening.
    • Antivirus. It is simply unable to detect each of numerous malicious scripts that appears every day. It just eats your system resources.The best it can do is to detect that your host is compromised, but not prevent this. It is not security, just marketing.
    • Making different rules for public internet and DMZ. Consider there’s no DMZ. Assume that your host can be accessed by crackers from anywhere.
    • bitcrafter@programming.devOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 hours ago

      Thanks, your comment is an antidote to my paranoia that it is impossible to do anything to address all threats. 😀

      Given that your advice is very sound, I have a question: would I gain much by using OpenBSD? The conventional wisdom when I last checked is that it is the most secure unix-like operating system on the planet.