Open main menu

CDOT Wiki β

Changes

OPS235 Lab 4 - CentOS7

626 bytes added, 04:27, 29 April 2015
no edit summary
The process may not be hard, but knowing how to stop, start, restart and check the status of services is absolutely critical to a Linux server. '''Aside from learning to trouble-shoot problems''' by checking the status of running services, '''understanding how to manage services is critical to help protect a Linux server from penetration''' (this term is referred to as "'''Hardening a system'''"). Sometimes it is "what we don't know" that can harm us. One key element in hardening a computer system is to disable non essential networkng services to allow IDSs ('''Intrusion Detection Systems''') to focus on a narrower range of policy violations. Learning to monitor the status, enable and disable networking services underlies the '''Backtrax''' motto:<br><br>'''"The quieter you are, then more you will hear..."'''
=== Part 1: How do we Manage System Services? ===
We have seen that maintaining unneeded '''packages can be a security risk''' due to the unnecessary increase in the complexity of your system. Similarly, it is also unnecessarily hazardous, and even more so, to leave unneeded services running. In this investigation, we will learn how to '''control services, and turn off those services that we think are not necessary to help reduce security risks'''.}} #For this part, remain in your centos2 VM.<ol> <li value="2">Issue the following Linux command: <ul> <li><b><code><span style="color:#3366CC;font-size:1.2em;">service --status-all</span></code></b></li> </ul> </li> <li>Note the services that are currently running.</li> <li>Use the <b><code><span style="color:#3366CC;font-size:1.2em;">service</span></code></b> command to stop the service named '''iptables'''</li> <li>Issue the <b><code><span style="color:#3366CC;font-size:1.2em;">service</span></code></b> command to verify that this service has stopped.</li> <li>If you reboot now - the iptables service will be turned back on. We don't want it on though, it causes students headaches. To turn it off permanently we need to use the chkconfig command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">chkconfig iptables off</span></code></b></li> <li>Reboot and confirm that it's no longer running.</li></ol>  ===Part 12: How do we Manage Runlevels?=== Running servers in graphical mode will make your system most likely to be penetrated. The X-windows framework can be vulnerable to attacks when these servers are connected to the Internet. This is why when you install server versions of Linux, they work in text-based mode only. Desktop versions of Linux are then installed on workstations (working in graphical mode) that connect to the server (for security reasons). The Linux sysadmin can also change the run-level (or state) of a graphical Linux server to run in text-based mode and run the graphical mode by issuing a command when graphic mode is required. The run-level term is now deprecated in Fedora, and will likely be deprecated in RHEL/CentOS at some point as well, but for now this is what the industry is using.
#Perform this part in both your centos2 and centos3 VMs.
The runlevel command is now deprecated in Fedora, and will likely be deprecated in RHEL/CentOS at some point as well, but for now this is what the industry is using.
 
#Perform this part in both your '''centos2''' and '''centos3''' VMs.
<ol>
<li value="2">Issue the following Linux command:
'''Answer Part 1 observations / questions in your lab log book.'''
=== Part 2: How do we Manage System Services? ===
 
We have seen that maintaining unneeded '''packages can be a security risk''' due to the unnecessary increase in the complexity of your system. Similarly, it is also unnecessarily hazardous, and even more so, to leave unneeded services running. In this investigation, we will learn how to '''control services, and turn off those services that we think are not necessary to help reduce security risks'''.}}
 
#For this part, remain in your centos2 VM.
<ol>
<li value="2">Issue the following Linux command:
<ul>
<li><b><code><span style="color:#3366CC;font-size:1.2em;">service --status-all</span></code></b></li>
</ul>
</li>
<li>Note the services that are currently running.</li>
<li>Use the <b><code><span style="color:#3366CC;font-size:1.2em;">service</span></code></b> command to stop the service named '''iptables'''</li>
<li>Issue the <b><code><span style="color:#3366CC;font-size:1.2em;">service</span></code></b> command to verify that this service has stopped.</li>
<li>If you reboot now - the iptables service will be turned back on. We don't want it on though, it causes students headaches. To turn it off permanently we need to use the chkconfig command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">chkconfig iptables off</span></code></b></li>
<li>Reboot and confirm that it's no longer running.</li>
</ol>
'''Answer Part 2 observations / questions in your lab log book.'''
13,420
edits