Background: 15 years of experience in software and apparently spoiled because it was already set up correctly.

Been practicing doing my own servers, published a test site and 24 hours later, root was compromised.

Rolled back to the backup before I made it public and now I have a security checklist.

  • @[email protected]
    link
    fedilink
    121 day ago

    I’ve been quite stupid with this but never really had issues. Ever since I changed the open ssh port from 22 to something else, my server is basically ignored by botnets. These days I obviously also have some other tricks like fail2ban, but it was funny how effective that was.

    • @[email protected]
      link
      fedilink
      44 hours ago

      We’re not really supposed to expose the ssh port to the internet at all. Better to hide it behind a vpn.

      But it’s too damn convenient for so many use cases. Fuck it. Fail2Ban works fine.

      You can also set up an ssh tarpit on port 22, which will tie up the bot’s resources and get them stuck in a loop for a while. But I didn’t think it was worth attracting extra attention from the bot admins to satisfy my pettiness.

    • @[email protected]
      link
      fedilink
      922 hours ago

      Almost the same here. I also change some ssh settings: disable root login, disable password, allow only public key login. That’s about it. I never had any problems.