Based on the Linux Master 1 exam syllabusReport an error
| Service | Port | Encrypted port | Role |
|---|---|---|---|
| SMTP | 25 | 465·587 | Sending mail |
| POP3 | 110 | 995 | Receiving mail (download and delete) |
| IMAP | 143 | 993 | Receiving mail (kept on server, synced) |
| FTP | 21 (control) · 20 (active data) | 990 (FTPS) | File transfer |
| SSH/SFTP | 22 | (self-encrypting) | Remote access and file transfer |
| Telnet | 23 | None (plaintext) | Remote access (legacy) |
| VNC | 5900+N | (SSH tunnel recommended) | Remote desktop |
A port number is an agreement about "which service this door is dedicated to." 25 is mail sending, 110 and 143 are mail receiving, 21 is FTP commands, 22 is SSH's multipurpose channel, 23 is plaintext Telnet. The encrypted ports (465, 587, 993, 995, 990) are variants of the plaintext ports with security added. You must be able to answer this mapping instantly to get through the practical exam.
⚠️ Trap Review: Easily swapped pairs — POP3 (110/995) and IMAP (143/993), SMTPS (465) and submission (587), FTP control (21) and active data (20), SSH (22) and Telnet (23). A choice that shifts these boundaries is wrong.
| Component | Role | Typical |
|---|---|---|
| MUA | Client for writing and reading | Thunderbird, mutt |
| MTA | Server-to-server transfer | Postfix, Sendmail |
| MDA | Final delivery to the mailbox | Procmail, Dovecot |
Key distinction: MTA (server-to-server transfer) ≠ MDA (mailbox delivery) ≠ MUA (user client). Sending is one-way SMTP, and receiving is POP3/IMAP. Postfix's config is /etc/postfix/main.cf, and opening mynetworks too wide creates an open relay. POP3 = download then delete, IMAP = keep on server and sync is the key distinction.
Active: The client announces its port with PORT → the server (port 20) connects back to the client
Passive: The client requests PASV → the server opens a high port → the client connects⚠️ Trap Review: In active mode the server connects back to the client (PORT, port 20), and in passive mode the client connects to the server (PASV, high port). A client behind NAT/a firewall needs passive mode. vsftpd's chroot_local_user locks users into their home, and ftpusers is the deny list. FTPS (FTP+TLS, 990) and SFTP (SSH-based, 22) are entirely different technologies.
# Key security settings (sshd_config)
PermitRootLogin no # Block direct root login
PasswordAuthentication no # Keys only (apply after registering keys)
MaxAuthTries 3 # Brute-force defense
# Key authentication: public key in the server's authorized_keys, private key on the client
ssh-keygen -t ed25519
ssh-copy-id user@host
# Forwarding
ssh -L 8080:internal:3306 user@gw # Local: my side → beyond the remote
ssh -R 9090:localhost:80 user@gw # Remote: remote side → my side
ssh -D 1080 user@gw # Dynamic: SOCKS proxyKey distinction: Server config sshd_config (with the d) vs client config ssh_config. The public key (.pub) goes on the server, the private key on the client. ~/.ssh is 700, key files are 600. scp's port is uppercase -P, ssh's port is lowercase -p. You must distinguish the direction differences among forwarding -L (local), -R (remote), and -D (dynamic).
VNC port = 5900 + display number (:1→5901). In X Window, the machine in front of the user that holds the screen and input devices is the X server, and the application that requests drawing is the X client (reversal). DISPLAY is the address of the screen to send the picture to, xhost controls per host and xauth per cookie, and xhost + (no argument) allows everything and is dangerous. A safe remote GUI is ssh -X.
ss -tlnp | grep :port # 1. Is the service LISTENing on that port?
systemctl status service # 2. Is the daemon alive?
telnet host port # 3. Can the port be reached from outside? (firewall)
firewall-cmd --list-all # 4. Has the firewall opened the port?
journalctl -u service # 5. What errors are in the logs?For server service outages, going through these five steps in order usually narrows down the cause — "is the daemon up, is it listening on the port, is the firewall blocking it, is the config correct, what do the logs say." If mail isn't going out, check mailq; if FTP is stuck, check active/passive and the firewall; if SSH is refused, check key permissions and PermitRootLogin; if the GUI doesn't come up, check DISPLAY and xhost. This week goes beyond the exam and is the foundation of real server operations.
mynetworks has been opened too wide, letting anyone relay mail. Abused for spam.sshd_config vs ssh_config : Server (daemon) config / client config. The one with the d is the server.authorized_keys, the private key on the client. ~/.ssh 700, key files 600.-L/-R/-D : From my side beyond the remote / from the remote to my side / SOCKS proxy.:1 it's 5901.DISPLAY : The address of the screen to which an X client sends its picture.Click a choice to reveal the answer and explanation.
Question 1
Which of the following service and default port pairs is NOT correct?
Question 2
Which is the correct receiving protocol and port suited to keeping mail on the server and syncing across multiple devices?
Question 3
Which statement about the data connection in FTP passive mode is correct?
Question 4
Which statement about FTPS and SFTP is correct?
Question 5
When configuring SSH public key authentication, which is the correct way the keys are placed on the server and client?
Question 6
Which is the correct sshd_config directive that blocks direct login of root on an SSH server?
Question 7
What is the default port when a VNC server is run on display :1?
Question 8
In the X Window System, which component manages the monitor, keyboard, and mouse in front of the user?
Question 9
In Postfix, which directive relates to the security problem where the trusted network is set too wide, so anyone can relay mail?
Question 10
Which correctly states the remote access protocol, and its port, that communicates in plaintext, is vulnerable for security, and was replaced by SSH?
Question 11
Which port forwarding option safely links an internal-network service you can't reach directly to my local port via an SSH gateway?
Question 12
Which of the following X access control commands is extremely risky for security and not recommended?