TCP Traffic Redirection on Windows

A very nifty tool, called RINETD.

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 configfile.

How to use it

First of, download it from the website. The Windows 2000 version also works on Server 2003.

Create a new config file, called “config.cfg” in the same folder as where you’ve extracted the file. Add the following line. The format is “ ”.

0.0.0.0 80 192.168.100.1 80

And start the daemon by executing the following.

C:\Folder\Where\You\Extracted\rinetd>rinetd.exe -cĀ config.cfg

This will start the daemon, using the config file mentioned. The example lets you redirect all traffic (0.0.0.0) on port 80 to a new server (192.168.100.1) on port 80. A perfect HTTP redirection!

You can add multiple rules, change ports, … A new rule should be started on a new line.