Once you have decided to create a name for a port, you need to edit the
file. To edit this file:
/etc/services in an editor, such as
- Find where the entry should go in the file. Notice that as you scroll down through the file, the port numbers increase.
You should put your new entry so that port numbers remain sorted.
- Insert the port name, number and protocol, any aliases, and a comment.
View the SlideShow below to see the process of inserting a new entry into the
What line would you put in /etc/services for the foobar service running on UDP port 8888?
foobar 8888/udp # the foobar service
The first field in /etc/services is the official service name. Next, you list the port and protocol using the "port/protocol" format. Finally, you list any aliases and a descriptive comment. Since you don't have any aliases, only a descriptive comment is required.
Port numbers to be configured in the latest version of Red Hat Linux
In the latest version of Red Hat Linux, version 8 as of September 2021, there are no specific port numbers that are pre-configured by default. However, the system administrator can configure any available port numbers for use by various services and applications running on the system.
Common port numbers that may be configured on a Red Hat Linux system include:
- Port 22: This is the default port used for SSH (Secure Shell) connections.
- Port 80: This is the default port used for HTTP (Hypertext Transfer Protocol) web traffic.
- Port 443: This is the default port used for HTTPS (Hypertext Transfer Protocol Secure) web traffic.
- Port 25: This is the default port used for SMTP (Simple Mail Transfer Protocol) email traffic.
- Port 53: This is the default port used for DNS (Domain Name System) traffic.
- Port 3306: This is the default port used for MySQL database traffic.
The exact port numbers that are configured on a Red Hat Linux system will depend on the specific services and applications that are installed and in use on the system. The system administrator can configure port numbers by editing the system's firewall settings or the configuration files for individual services and applications.
The next lesson describes the function of the Domain Name System