mtcps

mtcps is a small and fast inetd replacement. It has been designed to be small, fast and (hopefully) secure. It is a rewritten and strongly down stripped version of DJ Bernsteins tcpserver which uses the dietlibc and libowfat from Felix von Leitner.

Even if the program is based on the idea of DJ Bernstein's tcpserver, there is no security garantie! Please verify the code and let me know if you find any security holes.

Usage

mtcps [-dhqQv] [-b backlog] [-g gid] [-u uid] ip port program

where

-d
Drop program name prefix in log messages.
-h
Print help and exit.
-q
Quite, no output even not on errors.
-Q
Quite, output errors only (default).
-v
Verbose, output status messages.
-b
Set the backlog to given number. This option has no effect on systems supporting syncookies.
-u
Switch to given user id after port binding.
-g
Switch to given group id after port binding.
ip
This is the local ip address to bind to. If 0 or 0.0.0.0 is given, mtcps will bind to all local addresses. Note: You must give an ip address, not a hostname! Mtcps doesn't make dns lookups.
port
This is the port to bind to. If the port is less than 1024 you must start mtcps as root and you should use the -u and -g parameters to increase security. Note: You must give a port number, not a service! Mtcps doesn't take care of any /etc/services (or other sources e.g. nis).
program
Program to be called on a successful connection. All traffic from the client host is feed to descriptor 0 (stdin) of the program and all output of program to descriptor 1 (stdout) are feed thru the client.

By default mtcps logs all messages to descriptor 2 (stderr). You can edit config.h to enable syslog logging (+7k bloat) by uncommenting USE_SYSLOG. If you need specific error messages, uncomment USE_STRERR to get text errors in stead of just the libc errno.

Download

Current version is mtcps-0.2.2.tar.bz2.

MD5SUM is b7ce08d1fd4b9b050ea6e40aa3332d9b mtcps-0.2.2.tar.bz2