13,420
edits
Changes
no edit summary
{{Admon/note | Network Ports | When our Fedora 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.}}
# <span style="background-color:yellow">On your fedora host execute the command </span> <code><span style="background-color:yellow"netstat -at</codespan></spancode>
# This command will list all active TCP ports. Note the state of your ports.
# TCP is a connection oriented protocol that uses a handshaking mechanism to establish a connection. Those ports that show a state of LISTEN are waiting for connection requests to a particular service. For example you should see the <code>ssh</code> service in a LISTEN state as it is waiting for connections.
# On your fedora host try the command <code>netstat -atn</code>. How is this output different?
# 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)
# Examine the <code>/etc/services</code> file and find which ports are used for the services <code>ssh , ftp , http</code>
# Now execute the command <code>netstat -au</code> What is the difference between <code>-at</code> and <code>-au</code>?
# When examining UDP ports why is there no state?