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.

you are viewing a single comment's thread
view the rest of the comments
[–] 22 points 2 years ago (4 children)

Permitting inbound SSH attempts, but disallowing actual logins, is an effective strategy to identify compromised hosts in real-time.

The origin address of any login attempt is betraying it shouldn’t be trusted, and be fed into tarpits and block lists.

  • source
  • hideshow 8 child comments
  • [–] 10 points 2 years ago

    Endlessh and fail2ban are great to setup a ssh honeypot. There even is a Prometheus exporter version for some nice stats

    Just expose endlessh on your public port 22 and if needed, configure your actual ssh on a different port. But generally: avoid exposing ssh if you don't actually need it or at least disable root login and disable password authentication completely.

    https://github.com/skeeto/endlessh https://github.com/shizunge/endlessh-go https://github.com/itskenny0/fail2ban-endlessh

  • source
  • parent
  • [–] 6 points 2 years ago

    If it is your single purpose to create a blocklist of suspect IP addresses, I guess this could be a honeypot strategy.

    If it's to secure your own servers, you're only playing whack-a-mole using this method. For every IP you block, ten more will pop up.

    Instead of blacklisting, it's better to whitelist the IP addresses or ranges that have a legitimate reason to connect to your server, or alternatively use someting like geoip firewall rules to limit the scope of your exposure.

  • source
  • parent
  • [–] 2 points 2 years ago (1 child)

    Since I've switched to using SSH keys for all auth Ive had no problems I'm aware of. Plus I don't need to remember a bunch of passwords.

    But then I've had no training in this area. What do I know

  • source
  • parent
  • hideshow 2 child comments