Implementing TCP Wrappers
You can begin to use the TCP wrappers daemon by finding the line in /etc/inetd.conf that looks similar to the following:
telnet stream tcp nowait root /usr/sbin/in.telnetd usr/sbin/in.telnetd
Change it to look like the following:
telnet stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.telnetd
inetd starts tcpd, and when tcpd has logged the client:daemon request—and has satisfied any conditions—it starts the telnet daemon. Do not be surprised that your inetd.conf file is already using tcpd; this is standard practice in most distributions today. What will be missing are any sane limitations on connections and is covered below in the /etc/hosts.allow and (if used) the /etc/hosts.deny files.
Note
inetd needs to be signaled ...
Get Special Edition Using Linux®, Sixth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.