Also, if you have only a hosts.allow file, and no hosts.deny file, only hosts listed in the hosts.allow will be allowed any access at all. So we'll set inetd up so that if you telnet to port 17, you get the output of the fortune command. So, log into your machine as root and make sure that inetd is running. Even if you're not connected to anything, you can still set up the loopback device and connect to yourself. You'll have to restart inetd to make it re-read the inetd.conf file.
Money is the root of all wealth Connection closed by foreign host.
There are only a few programs that you can use for this. Any programs you do put in your inetd.conf file should have good security. Many need root privileges, but some don't. Check the tcpd man pages for more information about tcpd . Now that you have your services set up, you can hook in your own services and use them for whatever you want.