What does /etc/hosts.deny do?
The Correct Answer is: C. Blocks access via TCP wrappers
/etc/hosts.deny is a configuration file used by TCP wrappers, a host-based access control system for network services. It specifies which hosts or networks are explicitly denied access to services like sshd, telnet, or ftp that are linked with libwrap. When a connection request is received, the system checks hosts.allow first, and if there’s no match, it checks hosts.deny.
Why the other options are incorrect:
A. Denies DNS access
DNS access is controlled through DNS server configurations or firewall rules, not through /etc/hosts.deny. This file does not affect how DNS requests are handled or resolved; its role is specific to TCP-wrapped services.
B. Lists blocked users
This file does not manage user-based access. Instead, it works on a host-based level, blocking or allowing connections from specific IP addresses or hostnames. User access is typically controlled through PAM modules, /etc/passwd, or service-specific configuration files.
D. Stores host IPs
While the file may contain host IPs as part of access rules, its primary purpose is not to store IP addresses, but to define policies that deny network access. IPs in this file are part of rule definitions, not a storage or lookup list.
Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.
You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams