New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

LPI 102-500 Exam - Topic 7 Question 110 Discussion

Actual exam question for LPI's 102-500 exam
Question #: 110
Topic #: 7
[All 102-500 Questions]

Which file contains a set of services and hosts that will be allowed to connect to the server by going through a TCP Wrapper program such as tcpd? (Specify the full name of the file, including path.)https://lh3.googleusercontent.com/-5cd-clmKnbk/AAAAAAAAAAI/AAAAAAAAADM/-SXesH19Ido/s46-c-k-no/photo.jpg

Show Suggested Answer Hide Answer
Suggested Answer: A

The /etc/hosts.allow file contains a set of rules that specify which services and hosts are allowed to connect to the server by going through a TCP Wrapper program such as tcpd. TCP Wrappers are a security mechanism that can filter incoming requests based on the source address, destination address, and service name. TCP Wrappers can also perform logging, redirection, and execution of commands based on the rules.

The /etc/hosts.allow file has the following format:

service_list : host_list [ : option_list ]

The service_list is a comma-separated list of service names, such as sshd, telnet, or ftp. The host_list is a comma-separated list of host names, IP addresses, or network masks that are allowed to access the services. The option_list is an optional list of keywords that can modify the behavior of the rule, such as twist, spawn, deny, or allow.

For example, the following rule in /etc/hosts.allow allows ssh access from any host in the 192.168.1.0/24 network, and logs the connection attempt:

sshd : 192.168.1.0/255.255.255.0 : spawn /bin/echo %a from %h attempted to access %d >> /var/log/sshd.log

The /etc/hosts.allow file is processed before the /etc/hosts.deny file, which contains the rules for denying access to the server. If a request matches a rule in /etc/hosts.allow, it is granted access and the processing stops. If it does not match any rule in /etc/hosts.allow, it is checked against the rules in /etc/hosts.deny. If it matches a rule in /etc/hosts.deny, it is denied access and the processing stops. If it does not match any rule in either file, it is granted access by default.


LPI 102-500 Exam Objectives, Topic 110.3: Implement host security

LPI 102-500 Study Guide, Chapter 10: Securing Your System, Section 10.3: TCP Wrappers

hosts.allow man page

Contribute your Thoughts:

0/2000 characters
Bernardine
8 hours ago
Yeah, that's the right file!
upvoted 0 times
...
Val
5 days ago
Nope, it's definitely /etc/hosts.allow!
upvoted 0 times
...
Hoa
11 days ago
I thought it was more complicated than that.
upvoted 0 times
...
Effie
16 days ago
Wait, is it really just that simple?
upvoted 0 times
...
Brett
21 days ago
Totally agree, that's the right file.
upvoted 0 times
...
Alfred
26 days ago
I thought it was /etc/hosts.deny. Guess I need to brush up on my TCP Wrapper knowledge.
upvoted 0 times
...
Trevor
1 month ago
I’m pretty confident it’s `/etc/hosts.allow`, but I might confuse it with the deny file.
upvoted 0 times
...
Jerry
1 month ago
I feel like I’ve seen something about this in my notes, but I can’t recall if it’s `hosts.allow` or something else entirely.
upvoted 0 times
...
Gertude
1 month ago
I remember practicing a question about TCP Wrappers, and I think it was `/etc/hosts.deny` that was mentioned too.
upvoted 0 times
...
Theola
2 months ago
I think the file is called `/etc/hosts.allow`, but I’m not completely sure if that's the right path.
upvoted 0 times
...
Emiko
2 months ago
/etc/hosts.allow, got it. The question mentions TCP Wrappers, so that's the file I'd expect to contain the allowed connections. Shouldn't be too hard to remember this one.
upvoted 0 times
...
Mozell
2 months ago
Okay, let me think this through step-by-step. TCP Wrappers control access to services, and the /etc/hosts.allow file is where you specify the allowed hosts and services. I'm feeling good about /etc/hosts.allow as the answer.
upvoted 0 times
...
Delisa
2 months ago
The /etc/hosts.allow file is the correct answer. It's where we configure the TCP Wrapper to allow connections.
upvoted 0 times
...
Alaine
2 months ago
It's /etc/hosts.allow!
upvoted 0 times
...
Malinda
2 months ago
I think it's /etc/hosts.allow.
upvoted 0 times
...
Jules
3 months ago
Ah, the good old TCP Wrapper. Brings back memories of securing servers back in the day.
upvoted 0 times
...
Lizette
3 months ago
I always get those two files mixed up. Time to make a cheat sheet for TCP Wrapper config files.
upvoted 0 times
...
Antione
3 months ago
Hmm, I'm not totally sure about this one. I know it has something to do with TCP Wrappers, but I can't remember the exact file name. I'll have to think this through carefully.
upvoted 0 times
...
Oretha
3 months ago
This seems straightforward - the file that contains the allowed hosts and services is likely /etc/hosts.allow. I'm pretty confident in this answer.
upvoted 0 times
...

Save Cancel