Partition to harden Unix servers

Partition to harden Unix servers

Unix servers have been around since the beginning, so every hacker is familiar with them. Every precaution should be taken to keep them secure. This tip, excerpted from InformIT, discusses partitioning

    Requires Free Membership to View

    SearchSecurity.com members gain immediate and unlimited access to breaking industry news, virus alerts, new hacker threats, highly focused security newsletters, and more -- all at no cost. Join me on SearchSecurity.com today!

    Michael S. Mimoso, Editorial Director

    By submitting your registration information to SearchSecurity.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSecurity.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

to help in hardening Unix servers. Joseph Dries is the author of The Concise Guide to Enterprise Internetworking and Security.

The process of building a Unix or GNU/Linux server for use as a firewall or DMZ server begins with installation. Eliminating points of attack, such as filling the filesystem, or removing unnecessary libraries and services, is equivalent to removing possible entry points for intruders.

Some common guidelines for configuring Unix servers with a more secure default stance are available from CERT's Web site at ftp://info.cert.org/pub/tech_tips/UNIX_configuration_guidelines.

Besides having separate partitions for the obvious, such as SWAP and /tmp, you should protect against out-of-disk-space denial-of-service attacks. Intruders might try to create excessive generation of logging data or fill your file system with large files through FTP or mail spool. The best way to protect against this is to segment the filesystem hierarchy into separate physical partitions.

The root partition / can be small because it generally contains just the kernel--the necessary files, libraries, and configuration for booting in /bin, /sbin, /etc, and /lib. Access to the attached devices is provided through the /dev and /devices directories. Many GNU/Linux distributions store kernels and symbol data in the /boot directory, whereas kernel libraries are stored under /lib.

The /usr partition is normally where user-accessible applications are stored. Normally, /usr does not contain data or configuration files that change; therefore, an added security measure can be mounted as read-only.

The /var partition stores system logs and data services such as mail, Web, databases, printing, running services, package management and so on. On a mail server, you might want to make /var/spool/mail, or /var/mail in Solaris, a separate partition, or -- even better -- a separate disk array. If you only create one separate partition from /, /var is the one you should separate.

The /usr/local directory structure, and in Solaris the /opt directory, often contains locally installed optional software, configuration files and data.

/usr/local is normally not affected by operating system upgrades. Depending on how you use those directories, they too can be mounted as read-only.

These are suggestions and guidelines only and are different from recommended settings for a system that contains user accounts, usually in /home.


To read this entire tip, click over to InformIT. You have to register there, but it's free.


This was first published in June 2001

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.