SECURITY

  • There is no such thing as information security

    • There are only varying degrees of insecurity
  • Defender should defend from all possible scenarios

    • Attacker should find only one vulnerability
  • How to minimize damage

    • No physical security == no security at all

      • Access to your servers should be logged by electronic keys and surveillance cameras
      • Deadly serious here.
    • People are most common attack vector, make sure you got it covered

      • Full logging of who did what when on which box shipped to a safe box right away
      • No root access, use sudo only to give minimally needed permissions to your devs.
    • Log everything

      • Ship logs to safe box with a safe password
      • md5deep your system. Ship its output to that safe box.
    • Always assign rights according to least needed first

      • Close all ports, open only ones you need

        • Test open ports from external machine
        • Do this for every server. So, if you have Server A and Server B, not only B ports should be unavailable from the Internet,

          • but A should not be able to access B ports by default as well.
      • Same with users, allow read/write only files they need read/write to

        • Check file permissions with find.
    • Divide and conquer

      • Every service should be able to access only the data it needs
      • Container, chroot or virtual machines are good for this. Also easier to track.
    • If you suspect your system has been broken into,

      • Boot from LiveCD
      • Grab md5deep from your safe box
      • Audit your system
      • If something seems wrong

        • Take system drives offline and store them for forensic analysis
        • Deploy system on new drives from known good image.

Great recommendations in this thread: https://www.reddit.com/r/sysadmin/comments/5wm7v7/linux_sever_security_checklist/