The left column contains
the name of each service. The middle column defines the port number and protocol type used for
that service. The rightmost field contains an optional alias or list of aliases for the service.
As an example, examine the last entry in the file snippet. It describes the SMTP (Simple Mail Transfer
Protocol) service, which is the service used for delivering e-mail over the Internet. The middle column
contains the text 25/tcp, which tells you that the SMTP protocol uses port 25 and uses the
Transmission Control Protocol (TCP) as its protocol type.
What exactly is a port number? It is a unique number that has been set aside for a particular network
service. It allows network connections to be properly routed to the software that handles
that service. For example, when an e-mail message is delivered from some other computer to your
Linux box, the remote system must first establish a network connection with your system. Your
computer receives the connection request, examines it, sees it labeled for port 25, and thus knows
that the connection should be handed to the program that handles e-mail (which happens to be
sendmail).
I mentioned that SMTP uses TCP. Some services use UDP, the User Datagram Protocol. All you really
need to know about TCP and UDP (for the purposes of this security discussion) is that they provide
different ways of packaging the information sent over a network connection.
Pages:
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505