Red Hat

Make Time For SELinux In Your Most Sensitive Systems

Published in

Security-Enhanced Linux (SELinux) is a Linux feature that provides a variety of security policies, including U.S. Department of Defense style mandatory access controls, through the use of Linux Security Modules (LSM) in the Linux kernel. It is not a Linux distribution, but rather a set of modifications that can be applied to Unix-like operating systems, such as Linux and BSD. Its architecture strives to streamline the volume of software charged with security policy enforcement. (Wikipedia: SELinux)

One of the first Linux features that most users disable is Security-Enhanced Linux. SELinux "provides a hybrid of concepts and capabilities drawn from mandatory access controls, mandatory integrity controls, role-based access control (RBAC), and type enforcement architecture." SELinux's confinement of user programs and system servers is so much more secure, but confusing to implement for beginners.

As sudo or root, you can enable or disable SELinux in Fedora or any Red Hat clone with the following commands:

Temporary permissive mode:

setenforce 0

Temporary enforcing mode:

setenforce 1

Check the status of SELinux:

getenforce

As sudo or root, to permanently disable or enforce SELinux in any Red Hat clone:

vi /etc/selinux/config

Making time to secure your systems:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=strict

# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=1

Sorry, I don't have the time for SELinux:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0

If you are in a GUI, and installed the setroubleshoot package:

sealert -b #To view SELinux messages

If you are working from the command line:

vi /var/log/audit/audit.log #To view SELinux messages

Finally, use the power of Google and Youtube to get a better grasp of SELinux.

Syndicate content

© 2008-2010 Red Audit LLC.
Page generated in: 0.000236 seconds.