Redirects TCP connections from one IP address and port to another. rinetd is a single-process server which handles any number of connections to the address/port pairs specified in the file /etc/rinetd.conf. Since rinetd runs as a single process using nonblocking I/O, it is able to redirect a large number of connections without a severe impact on the machine. This makes it practical to run TCP services on machines inside an IP masquerading firewall. rinetd does not redirect FTP, because FTP requires more than one socket.
rinetd is typically launched at boot time, using the following syntax:


The configuration file is found in the file /etc/rinetd.conf, unless another file is specified using the -c command line option.

Forwarding Rules


Build info

Build highlights

original version.

fixed bug when several reads are necessary on one end or the other before a write flushes them. Fixed bug which threw away data not yet sent to the other side on close, when running under Linux. Fixed associated bugs that probably affected other operating systems as well. Fixed bug causing long, perhaps indefinite pauses when a possible connection to a server socket went away before the accept() call, resulting in a blocking call.

fixed additional bugs relating to the code previously used only by non-Linux OSes. This should fix problems such as connections not going away when they should or connections being mysteriously closed. Most of that code is now used by Linux also, so it is likely that rinetd is much closer to bug-free on non-Linux platforms. Of course, I don't actually have any to play with it on.

added support for kill -1 (SIGHUP) and specification of service names instead of port numbers. Removed calls to realloc(), replacing them with code that should fail gracefully without crashing the program or breaking existing connections when another application is hogging memory.

added logging in both tab-delimited and web-server-style formats. No longer exits if an individual configuration file line generates an error. Added allow and deny rules. Added -c command line option to specify a configuration file.

fixed failure to check for an open log file before writing log entries.

documentation added regarding the ability to bind to all IP addresses, if desired, using the special address

ported to Win32. Various compatibility fixes were made and some minor oversights without functional consequences were corrected.

fixed a bug in 0.6 which completely broke rinetd under Linux. Oops.

fixed a potential buffer overrun; prior versions failed to reallocate one of the arrays correctly when reallocating memory to accommodate more connections. Thanks to Sam Hocevar.