201-450 practice question 11 of 25
Which /etc/hosts.allow entries will permit access to sshd for users from the 192.168.1.0/24 subnet? (Choose TWO correct answers.)
Full set: 161 questionsThe /etc/hosts.allow file uses specific syntax to define access rules for TCP Wrappers. To permit an entire subnet, two common formats are valid. The first is the network address followed by a trailing dot (e.g., 192.168.1.), which acts as a wildcard for the remaining part of the IP address. The second valid format is the network/netmask pair (e.g., 192.168.1.0/255.255.255.0), which explicitly defines the network range. Both of these formats correctly represent the 192.168.1.0/24 subnet.
B. sshd : 192.168.1 without a trailing dot would match a hostname, not a network prefix.
C. The netmask keyword is not a valid syntax for the hosts.allow file; the slash notation is used instead.
E. sshd : 192.168.1.0 would only match the single host with that specific IP address, not the entire subnet.
1. hostsaccess(5) Linux manual page. Section "PATTERNS". It states: "A string that ends with a . character. A host address is matched if its first numeric fields match the given string." and "An expression of the form n.n.n.n/m.m.m.m is interpreted as a net/mask pair."
2. Red Hat Enterprise Linux 7 System Administrator's Guide, Chapter 15.5. "TCP Wrappers Configuration Files". Section 15.5.2 "Access Rules". This section provides examples confirming the 192.168.0. and 10.0.0.0/255.255.255.0 formats.
Keep practicing
Take the free 201-450 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 201-450 practice questions
- Question 1What is the functionality that PXE provides?
- Question 2What mechanism does collectd use to gather monitoring information on systems?
- Question 3Which of the following terms are used to describe 3.x kernel releases? (Choose TWO correc…
- Question 4Which of the following is a side effect of extensive usage of swap space?
- Question 5In the following output, what is the 5 minute load average for the system? # uptime 12:10…
- Question 6Which of the following tools are used to measure memory usage? (Choose THREE correct answ…
