Setting up a TCP Proxy Server

Associate
Joined
30 Mar 2004
Posts
1,148
Location
West Wing
Hi, I am currently using the port mapping tool in CC Proxy for routing external TCP traffic to connect with computers within a VPN. This works well for small number of devices as I can manually enter the listening port and destination IP:Port. See here.

However I want to set up a range of hundreds of mapped ports which will take a lifetime to manually enter in CC Proxy.

I have a list in a CSV of the listening IPs and destination ports I want each to connect with:
Listening IP / Listening Port / Forwarding IP / Forwarding Port
192.168.1.39 / 6700 / 13.155.19.2 / 2048
192.168.1.39 / 6701 / 13.155.19.3 / 2048
192.168.1.39 / 6702 / 13.155.19.4 / 2048

Whats the best way of approaching this?
 
I'm answering my own question by extensive google searches:

As its pure port mapping, i.e. incoming connection on port xxx to be forwarded to another host:port, I can use standard windows functionality with the command:

netsh interface portproxy add v4tov4 listenport=8001 listenaddress=0.0.0.0 connectport=80 connectaddress=192.168.0.10

This will forward all connections on port 8001 to the remote host address on port 80. Then all I need to do is create a batch script for adding multiple rules. :)
 
Back
Top Bottom