ucspi-tcp-0.88

Introduction to ucspi-tcp

Download location (HTTP):       http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
Download location (FTP):        
Version used:                   0.88
Package size:                   56 KB
Estimated Disk space required:  2 MB
Additional downloads:
ucspi-tcp errno patch

The ucspi-tcp package consists of a suite of tools that allow the easy creation of client-server tcp daemons. Tcpserver is a more secure alternative to inetd. It has built in functionality for rule based access control, and will gracefully defer connections when the configurable maximum load is reached, unlike inetd. Tcpserver is also recommended for use with Qmail, and was written by the same author.

Installation of ucspi-tcp

Install ucspi-tcp by running the following commands:

patch -Np1 -i ../ucspi-tcp-0.88.errno.patch &&
sed 's|/usr/local|/usr|' conf-home > conf-home~ &&
mv conf-home~ conf-home &&
sed 's/bin/sbin/' hier.c > hier.c~ &&
mv hier.c~ hier.c &&
make &&
make setup check

Command explanations

sed 's|/usr/local|/usr|' conf-home > conf-home~
mv conf-home~ conf-home
sed 's/bin/sbin/' hier.c > hier.c~
mv hier.c~ hier.c
These commands change the installation directory to /usr/sbin from the default of /usr/local/bin. Since these tools are used in conjunction with daemons, they don't make much sense in general user directories. However, some of the example programs and the tcpclient program might be of use to non-root users. If you wish to make these available, then we would suggest installing as above, and then executing the following commands:
cd /usr/sbin
mv tcpclient *@ mconnect delcr addcr tcpcat /usr/bin
This will place the client related programs into /usr/bin for general use.

Contents

The ucspi-tcp package contains tcpserver, tcprules, tcprulescheck, argv0, fixcrio, recordio, rblsmtpd, tcpclient, who@, date@, finger@, http@, tcpcat, mconnect, addcr and delcr

You can also find detailed descriptions of each of these programs at http://cr.yp.to/ucspi-tcp/tcpserver.html, but here is a brief summary:

Description

tcpserver

tcpserver listens for incoming tcp connections on a given port, and runs a program of your choosing in response to a connection.

tcprules

tcprules compiles rules that govern access control for tcpserver into a fast access database format.

tcprulescheck

tcprulescheck makes it possible to see how tcpserver will react to connections from a given address without actually having to connect via that address. This is useful for checking to see if the access control rules you are using are doing what you expected.

argv0

argv0 runs a given program with a specified 0th argument.

fixcrio

fixcrio inserts carriage returns at the end of lines when they are missing.

recordio

recordio records all input and output of a program given as an argument.

rblsmtpd

rblsmtpd is a spam blocking program that works in conjunction with your smtp daemon and tcpserver.

tcpclient

tcpclient creates a connection to a tcp port for a given program.

who@

who@ is a demonstration program using tcpclient that has the functionality of the rwho program. It requires a server running sysstat on port 11.

date@

date@ is a demonstration program using tcpclient that will return the system time of a remote host which is running a daytime service on port 13.

finger@

finger@ is a demonstration program using tcpclient that mimics the functionality of the finger program. It requires a server running fingerd on port 79.

http@

http@ downloads web pages from web servers.

tcpcat

tcpcat connects to a tcp port and prints all that is returned from the port.

mconnect

mconnect connects to a tcp port, delivers any input specified to the port, and prints any output from the port.

addcr

addcr adds carriage returns to files. This and delcr are useful for converting between Windows to UNIX file formats.

delcr

delcr removes carriage returns from files.