Sunday, July 25, 2010

TCP Port ReRouter

TCP PortReRouter is a basic network service that proxies TCP sockets to/from an alternate IP and/or an alternate port. For example, you can redirect traffic targeting SERVER-A on Port 992 to SERVER-B on port 2282.

SSL is not supported as SSL implements IP validation.

To configure TCP Port ReRouter, you must edit the TcpPortReRouterService.exe.config file if running as a Windows service or the TcpPortReRouter.exe.config file if running the console application.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
 <configSections>
   <section name="portRerouter" type="TcpPortReRouter.RouteMapConfiguration, TcpPortReRouter"/>
 </configSections>

 <portRerouter>
   <routes>

     <!-- listen on the primary IP on port 89, redirect to www.google.com on port 80 -->
     <add name="www.google.com on port 89" listenPort="89" targetHost="www.google.com" targetPort="80"></add>

     <!-- listen on the loopack adapter, redirect to www.google.com's IP address on port 80 -->
     <add name="www.google.com on loopback @ port 89" listenIP="127.0.0.1" listenPort="89" targetHost="74.125.19.99" targetPort="80"></add>
     
   </routes>
 </portRerouter>
 
</configuration>

To run the console application just start TcpPortReRouter.exe.

Read more: Codeplex

Posted via email from .NET Info