HP-UX Internet Services Administrator's Guide (May 2010)

The tcpd Daemon
The tcpd daemon monitors access to a service, logs the host name and the remote user
name owning the connection, and performs some additional access control checks.
After tcpd checks the connection, the wrapper invokes the desired server program
and exits.
Enabling tcpd
You can use either of the following methods to enable tcpd:
1. Edit each entry in the /etc/inetd.conf file to include the tcpd server program,
/usr/lbin/tcpd. The server program field in the /etc/inetd.conf file
indicates the absolute path name of the server that inetd executes. For example,
consider the following entry for the telnet service in the /etc/inetd.conf
file:
telnet stream tcp nowait root /usr/lbin/telnetd telnetd
Edit this entry to include the tcpd server, /usr/lbin/tcpd instead of the telnet
server, /usr/lbin/telnetd, as follows:
telnet stream tcp nowait root /usr/lbin/tcpd /usr/lbin/telnetd telnetd
NOTE: If you specify this entry without the absolute path of telnetd
(/usr/lbin/telnetd), tcpd searches the telnetd binary in the
/usr/lbin/wrapper directory.
The last component of the path name, /usr/lbin/telnetd telnetd, is used
for access control and logging. When the telnet service is requested, inetd
invokes the tcpd server instead of invoking the telnet server. tcpd performs
access control checks and verifies whether the connection is valid. Then, it invokes
the telnetd server. Similarly, you can change the entries for other services to
include the tcpd server.
After making the relevant changes, you must reconfigure inetd using the following
command on the command line:
# inetd -c
2. Move the service daemon to the /usr/lbin/wrapper directory, and move tcpd
to the location of the service daemon. You need not make any changes to the
/etc/inetd.conf file. For example, you can enable the ftpd service with tcpd
by executing the following commands at the command prompt:
# mkdir /usr/lbin/wrapper
# mv /usr/lbin/ftpd /usr/lbin/wrapper
# cp tcpd /usr/lbin/ftpd
40 TCP Wrappers