Ask the Expert

Hardening Linux servers for remote access

I host several Linux servers which allow users remote access and file transfer capabilities via SSHv2/SFTP. These systems are already hardened with external firewalls, SSH hardening ala DenyHosts and internal privilege hardening via Bastille, limits.conf and some of my own hand-rolled scripts. Is there anything you might recommend to further tighten such a setup, since many users will have shell access?

Requires Free Membership to View

It sounds like you've got most of the bases covered. I have a few suggestions that may assist you:

  • Look at PAM and potentially how to use it to harden your user controls. Strong passwords and authentication controls are critical on hosts with large numbers of shell users.
  • Consider a deployment of SELinux (or depending on your platform AppArmor). While both can be complicated to configure they can be very powerful in adding more granular controls to your hosts.
  • Consider very carefully what packages are installed, for example, if a lot of users have shell access then the addition of tools like compilers and scripting languages can greatly assist an attacker in compromising your host. Ensure you have the minimal and most appropriate set of packages installed.
  • Often the first warnings of something going wrong is a log message. Try setting up some centralized logging and alerting on some of the more critical messages for security and operations and consider the use of tools like SEC or Swatch, which are helpful with this.
  • Lastly, ensure you keep up to date with patches and updates for both your operating system and your applications.
  • Hope that helps and good luck with securing your hosts.

    This was first published in January 2008

    There are Comments. Add yours.

     
    TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

    REGISTER or login:

    Forgot Password?
    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
    Sort by: OldestNewest

    Forgot Password?

    No problem! Submit your e-mail address below. We'll send you an email containing your password.

    Your password has been sent to: