Lab 20: Network Services
Objective Focus
- Manage Basic Networking
- Configure network services to start automatically at boot
Official RHCSA EX200 Exam Objectives
Intro
When we talk about networking services, there are common or “well-known” ports used by programs that are used everyday for communication between computing devices. This means that, a certain port used by programs and applications become common knowledge amongst technical professionals.
Below is a table of “well-known” ports.
Port Number | Protocol | Description | Example Usage |
---|---|---|---|
20 | TCP | FTP (File Transfer Protocol) - Data Transfer | Transferring files between a client and a server. |
21 | TCP | FTP (File Transfer Protocol) - Control | Sending commands to an FTP server. |
22 | TCP/UDP | SSH (Secure Shell) | Secure remote login and command-line access to servers. |
23 | TCP | Telnet | Unencrypted remote command-line access (less secure than SSH, rarely used). |
25 | TCP | SMTP (Simple Mail Transfer Protocol) | Sending email between mail servers. |
53 | TCP/UDP | DNS (Domain Name System) | Translating domain names like to IP addresses. |
80 | TCP | HTTP (Hypertext Transfer Protocol) | Unencrypted web traffic. |
110 | TCP | POP3 (Post Office Protocol version 3) | Receiving email from a mail server. |
143 | TCP | IMAP (Internet Message Access Protocol) | Managing and retrieving email from a mail server. |
443 | TCP | HTTPS (HTTP Secure) | Encrypted web traffic (secure websites). |
3389 | TCP/UDP | RDP (Remote Desktop Protocol) | Remote access to Windows desktops. |
File that help with understanding Networks services
$ /etc/services
- This is basically like a phone book for network services. If you know a service name then we can look up the port that it corresponds with here.
Intro to Systemctl
systemctl is the command line tool that helps accomplish our tasks involving systemd. This includes getting services to start at boot.
$ man systemctl
$ systemctl <action> <service_name>
$ systemctl list-units --type=service
Hold up, what is “Systemd”?
Here is a link to Red Hats documentation for explaining systemd. We do not have to learn every detail about it. Just know it is the first process (PID 1). We can confirm that by using $ ps -e. This means that is responsible for starting and/or stopping other processes.
We use systemctl to manage systemd.
Finding our service
$ systemctl list-units --type=service
- This commands shows us the services systemd knows about
$ systemctl list-unit-files --type=service
- This command list all unit files known to systemd on the system. I like this one better because it shows up a more information and in a cleaner way
$ systemctl status <service_name>
- This command shows runtime details and log information related to systemd, in our case a service
Set to start at boot
$ systemctl enable <service_name>.service
Exercise with SSH
$ systemctl list-unit-files --type=service | grep ssh
$ systemctl status sshd.service
$ systemctl start sshd.service
$ systemctl enable sshd.service
End of this lab
That’s all for this lab. Network services are going to come back around in this course as it is a major part of system administration.