Rinetd - simple TCP/UDP port redirector

In the world of networking, tools that can redirect traffic from one address and port to another are incredibly valuable. One such tool, known for its simplicity and effectiveness, is rinetd. This software is used widely by system administrators to redirect TCP traffic, which can be particularly useful in a variety of network management scenarios.

What is rinetd?

Rinetd is TCP/UDP port redirector. It is a small, yet powerful utility designed to efficiently redirect TCP connections from one IP address and port to another IP address and port. This is particularly useful when direct connections to a service are not possible due to network restrictions, or when services need to be moved or temporarily replicated without adjusting DNS settings or client configurations.

Rinetd is straightforward to configure and manage, which makes it an excellent tool for quick redirections. It offers logging capabilities that allow administrators to keep track of redirected traffic, which is useful for troubleshooting and monitoring. It consumes minimal system resources, making it an ideal choice for older hardware or systems with limited processing capacity. rinetd is available for various Unix-like operating systems and Windows, allowing for versatile deployment across different systems.

Config

The behavior of rinetd is controlled by a configuration file, typically located at /etc/rinetd.conf. This file specifies which ports to listen on and where to redirect the incoming connections. The syntax for each line in the configuration file is generally as follows:

bindaddress    bindport    connectaddress    connectport

For example, to redirect all traffic coming to local port 80 to a web server at 192.168.1.100 on port 8080, the configuration line would be:

0.0.0.0    80    192.168.1.100    8080

Rinetd is a compact and efficient tool for TCP redirection, suited to a variety of practical networking tasks from service migration to simple load distribution. Its ease of use and minimal resource demand make it an attractive option for system administrators in both small-scale and larger environments. However, for more complex network management tasks, more robust solutions may be necessary. Regardless, rinetd remains a valuable tool in the network administrator’s toolkit, providing a straightforward solution to a common need.

https://github.com/samhocevar/rinetd