SSH is fantastic for port redirection in a lot of cases, but what if you want to set up a redirection of incoming and outgoing ports without the hassle of setting up SSH servers? Rinetd is a great program that will let you do this.
[Linux Download] http://www.boutell.com/rinetd/http/rinetd.tar.gz
[Windows Download] http://www.boutell.com/rinetd/http/rinetd.zip
Set the rinetd.conf file in the same directory (Windows) or /etc/rinetd.conf (Linux)
<bind address> <bind port> <connect address> <connect port>
bind address / port : The “incoming” IP address, that which we wish to bind on and forwarding packets originally targeted to it onwards.
connect address / port : The “outgoing” IP address, that which we wish to send the packets onwards to.
A server we have compromised is originally located on 10.1.1.223:80 and we wish to forward all the HTTP requests onto our malicious server at 10.1.1.250:8080.
#bindaddress #bindport #connectaddress #connectport
10.1.1.223 80 10.1.1.250 8080
Run Rinetd, all traffic being sent to the server on 10.1.1.223 will be routed to 10.1.1.250 port 8080. Likewise any responses from 10.1.1.250:8080 will be routed back through 10.1.1.223 to the original requester.