XK0-005 · Question #291
A Linux administrator is developing a Bash script to close specific ports on a server firewall. The administrator is not certain of the default port for the Internet Message Access Protocol. Which…
The correct answer is D. /etc/services. The /etc/services file on a Linux system maps service names to their corresponding port numbers and protocols.
Question
A Linux administrator is developing a Bash script to close specific ports on a server firewall. The administrator is not certain of the default port for the Internet Message Access Protocol. Which of the following files should the administrator check to determine the default port?
Options
- A/etc/network
- C/etc/resolv.conf
- D/etc/services
How the community answered
(33 responses)- A6% (2)
- C3% (1)
- D91% (30)
Why each option
The `/etc/services` file on a Linux system maps service names to their corresponding port numbers and protocols.
`/etc/network` (or `/etc/sysconfig/network-scripts` on some distributions) typically contains network interface configuration files, not service port mappings.
`/etc/resolv.conf` is used to configure DNS resolvers, specifying IP addresses of DNS servers, not service port mappings.
The `/etc/services` file is a standard configuration file in Linux that contains a list of known services, their corresponding port numbers, and the protocols (TCP/UDP) they use. An administrator can consult this file to determine the default port for specific services like IMAP.
Concept tested: Linux service port configuration file
Source: https://man7.org/linux/man-pages/man5/services.5.html
Topics
Community Discussion
No community discussion yet for this question.