The tcpd program can be set up to monitor incoming requests for telnet, finger, ftp, exec, rsh, rlogin, tftp, talk, comsat and other services that have a one-to-one mapping onto executable files.
The program supports both 4.3BSD-style sockets and System V.4-style TLI. Functionality may be limited when the protocol underneath TLI is not an internet protocol.
Operation is as follows: whenever a request for service arrives, the inetd daemon is tricked into running the tcpd program instead of the desired server. tcpd logs the request and does some additional checks. When all is well, tcpd runs the appropriate server program and goes away.
Optional features are: pattern-based access control, client username lookups with the RFC 931 etc. protocol, protection against hosts that pretend to have someone elses host name, and protection against hosts that pretend to have someone elses network address.
In order to find out where your logs are going, examine the syslog configuration file, usually /etc/syslog.conf.
tcpd verifies the client host name that is returned by the address->name DNS server by looking at the host name and address that are returned by the name->address DNS server. If any discrepancy is detected, tcpd concludes that it is dealing with a host that pretends to have someone elses host name.
If the sources are compiled with -DPARANOID, tcpd will drop the connection in case of a host name/address mismatch. Otherwise, the hostname can be matched with the PARANOID wildcard, after which suitable action can be taken.
inetadm -m network/finger tcp_wrapper=TRUE
The example assumes that the network/finger service hasn't been removed from your system.
Similar changes will be needed for the other services that are to be covered by tcpd. In case a (non-standard) daemon does not exist as a service already, use smf(5) to make it a service by creating a manifest, and then enable tcp_wrappers for that service as shown in the example.
The program does not work with RPC services over TCP. The only non-trivial service that is affected by this limitation is rexd, which is used by the on(1) command. This is no great loss. On most systems, rexd is less secure than a wildcard in /etc/hosts.equiv.
RPC broadcast requests (for example: rwall, rup, rusers) always appear to come from the responding host. What happens is that the client broadcasts the request to all portmap daemons on its network; each portmap daemon forwards the request to a local daemon. As far as the rwall etc. daemons know, the request comes from the local host.
The default locations of the host access control tables are:
hosts_access(5), format of the tcpd access control tables. syslog.conf(5), format of the syslogd control file. smf(5), service management facility.AUTHORSWietse Venema (wietse@wzv.win.tue.nl), Department of Mathematics and Computing Science, Eindhoven University of Technology Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands \" @(#) tcpd.8 1.5 96/02/21 16:39:16