Tcp wrappers - First "/etc/hosts.allow" is check, and if there is an entry in
this file, no more
checking it done. If are no matches in "/etc/hosts.allow", the
"/etc/hosts.deny" file is checked
and if a match is found, that service is blocked for that host.
Example "/etc/hosts.deny" file:
sshd: 192.168.1.171
The above file blocks access to computer 192.168.1.171. It's also possible
to run commands when
someone from this computer tries to ssh in. This example sends mail.
sshd: 192.168.1.171: spawn (echo -e "%d %h %H %u"| /bin/mail -s
'hosts.deny entry' root)
Of course, you can also run commands in the "/etc/hosts.allow" if you
wanted mail sent for a successful
login.