Open main menu

CDOT Wiki β

Changes

OPS235 Lab 6 - CentOS7

8 bytes removed, 18:26, 4 May 2015
no edit summary
|}
When our CentOS system provides any services on a network, those services are accessible through a port number. All network services are configured to be accessed on a particular port number. By examining which ports are active on our system we can know what services (and points of attack) are available on our system. The ability to examine this information is important for troubleshooting network services and securing our systems. One great tool for this is the '''netstat''' command.
# Perform this section on your '''c7host''' machine.
{| width="40%" align="right" cellpadding="10"
|- valign="top"
|{{Admon/note | Network Ports | When our CentOS system provides any services on a network, those services are accessible through a port number. All network services are configured to be accessed on a particular port number. By examining which ports are active on our system we can know what services (and points of attack) are available on our system. The ability to examine this information is important for troubleshooting network services and securing our systems. One great tool for this is the <code>netstat</code> command.}}
|}
<ol><li value="12">On your CentOS host try the command <b><code><span style="color:#3366CC;font-size:1.2em;">netstat -atn</span></code></b>. How is this output different?</li><li>Without the <code>-n</code> option <code>netstat</code> attempts to resolve IP addresses to host names (using '''/etc/hosts''') and port numbers to service names (using '''/etc/services''')</li><li>Examine the '''/etc/services''' file and find which ports are used for the services: '''ssh''', '''sftp''', '''http'''</li><li>Now execute the command <b><code><span style="color:#3366CC;font-size:1.2em;">netstat -au</span></code></b> What is the difference between the options: '''-at''' and '''-au'''?</li><li>When examining UDP ports why is there no state?</li></ol>
13,420
edits