Total Pageviews

Monday 2 July 2012

Port forwarding as a windows service

in case you need to do a port forward on a Windows machine you have several options.
Here is an example on how to use NETSH INTERFACE PORTPROXY to forward all requests that came to local IP on port 25 to 192.168.0.100 on port 80. Remember to enable IPv6!
c:\>netsh
netsh>interface portproxy
netsh interface portproxy>add v4tov4 listenport=25 connectaddress=192.168.0.100 connectport=80 protocol=tcp
You can find more information about the commands here.
If it doesn't work you can use a software for this kind of job. For example if you need to use connectaddress= 127.0.0.1 it will not work.
One option is the Port Forwarding tool (GUI or command line) you can find here . In some cases it crashes or it loads the CPU.
The most stable software I have tried is the PassPort tool you can find here (sourceforge.net). It is a simple port forwarding utility. The program runs as a NT Service and can forward various ports from any of local interfaces to whatever remote IP address (127.0.0.1 too). It is easily manageable with a simple Windows GUI. It works properly on Windows XP, Vista and Windows 7!
Port forwarding using SSH would also work fine but it is more complicated on Windows. You could use CopSSH to install SSH server on Windows and you can find it here.

from http://www.aftershell.com/tag/portproxy/