SK0-004 · Question #125
An email administrator is tasked to setup a Linux mail server. One of the requirements is to close all ports except SSH, HTTPS, SMTP, POP3, and IMAP4. Which of the following commands should be used…
The correct answer is A. lsof B. netstat. To audit open ports on a Linux mail server, administrators use lsof and netstat, both of which can display active network connections and listening ports.
Question
An email administrator is tasked to setup a Linux mail server. One of the requirements is to close all ports except SSH, HTTPS, SMTP, POP3, and IMAP4. Which of the following commands should be used to see which ports are currently open on the mail server? (Select TWO).
Options
- Alsof
- Bnetstat
- Cipconfig
- Dtraceroute
- Eping
- Fdig
How the community answered
(28 responses)- A82% (23)
- D11% (3)
- E4% (1)
- F4% (1)
Why each option
To audit open ports on a Linux mail server, administrators use lsof and netstat, both of which can display active network connections and listening ports.
lsof (List Open Files) is a Linux utility that displays all open files, including network sockets. When invoked with the '-i' flag, it lists all open ports and the processes listening on them, making it ideal for auditing which ports are active on the mail server.
netstat (network statistics) reports network connections, routing tables, and interface statistics on Linux systems. Using flags such as '-tuln', it shows all TCP and UDP ports currently in a listening state, providing a comprehensive view of which ports are open.
ipconfig is a Windows-only command used to display IP address configuration and is not available on Linux, nor does it show open or listening ports.
traceroute maps the network hop path to a remote destination host and provides no information about which ports are open or listening on the local server.
ping sends ICMP echo requests to test host reachability and provides no information about open ports or listening services on the local machine.
dig is a DNS lookup utility used to query DNS records such as A, MX, or NS records and has no capability to display open or listening ports on a server.
Concept tested: Linux commands for auditing open network ports
Source: https://man7.org/linux/man-pages/man8/netstat.8.html
Topics
Community Discussion
No community discussion yet for this question.