domain, execute the
echo
command to log the attempt, including the client hostname (by using
the
%h
expansion), to a special file:
sshd : .example.com \ : spawn /bin/echo `/bin/date` access denied to
%h>>/var/log/sshd.log \ : deny
Similarly, expansions can be used to personalize messages back to the client. In the following
example, clients attempting to access FTP services from the
example.com
domain are informed
that they have been banned from the server:
vsftpd : .example.com \ : twist /bin/echo "421 %h has been banned from this
server!"
For a full explanation of available expansions, as well as additional access control options, refer
to section 5 of the man pages for
hosts_access
(
man 5 hosts_access
) and the man page for
hosts_options
.
For additional information about TCP wrappers, refer to
Section 5, “Additional Resources”
. For
more information about how to secure TCP wrappers, refer to the chapter titled Server Security
in the Red Hat Enterprise Linux Security Guide.
3.
xinetd
The
xinetd
daemon is a TCP wrapped super service which controls access to a subset of
popular network services including FTP, IMAP, and Telnet. It also provides service-specific
configuration options for access control, enhanced logging, binding, redirection, and resource
utilization control.
When a client host attempts to connect to a network service controlled by
xinetd
, the super
service receives the request and checks for any TCP wrappers access control rules. If access is
allowed,
xinetd
verifies that the connection is allowed under its own access rules for that
service and that the service is not consuming more than its alloted amount of resources or is in
breach of any defined rules. It then starts an instance of the requested service and passes
control of the connection to it. Once the connection is established,
xinetd
does not interfere
further with communication between the client host and the server.
4.
xinetd
Configuration Files
The configuration files for
xinetd
are as follows:
•
/etc/xinetd.conf
— The global
xinetd
configuration file.
•
/etc/xinetd.d/
— The directory containing all service-specific files.
4.1. The
/etc/xinetd.conf
File
Chapter 17. TCP Wrappers and ...
318
Summary of Contents for ENTERPRISE LINUX 4.5.0 -
Page 1: ...Red Hat Enterprise Linux 4 5 0 4 5 0 Reference Guide ISBN N A Publication date ...
Page 2: ...Red Hat Enterprise Linux 4 5 0 ...
Page 4: ...Red Hat Enterprise Linux 4 5 0 ...
Page 24: ...xxiv ...
Page 26: ......
Page 36: ...12 ...
Page 72: ...48 ...
Page 112: ...88 ...
Page 122: ...98 ...
Page 140: ...116 ...
Page 142: ......
Page 300: ...276 ...
Page 318: ...294 ...
Page 320: ......
Page 332: ...308 ...
Page 350: ...326 ...
Page 378: ...354 ...
Page 388: ...364 ...
Page 394: ...370 ...
Page 395: ...Part IV Appendixes ...
Page 396: ......