Windows 7 with internal port redirection, is it possible?

I received a request from one of our developers that I am having trouble solving.

Here in the office they use linux desktops and I can forward the localhost:80 via a iptables nat to localhost:8080. What they want is the same thing at home in windows 7.

I got what I think are two ways of going about this. One to reconfigure the jboss webserver and all the webapps urls (messy). The other is find a way to redirect/nat the localhost port 8080 to port 80. Though in windows 7 I am unsure of how to do this.

Anyone have anyideas on how to do the second?


AFAIK, Win7 has no iptables equivalent. Writing a server that does what you want (listens on a port, copies everything to/from another) should be easy enough. You can find one at this URL: http://www.quantumg.net/portforward.php (untested). Using a reverse proxy (Google is yout friend) may fit the bill for http-like traffic. Also check this post: https://stackoverflow.com/questions/3721000/port-forwarding-on-windows-7


Yes, windows does have a iptables equivalent, it is via the tool netsh and the portproxy interface.

The command to do what you want would be

netsh interface portproxy add v4tov4 listenaddress=YOUR_IP_HERE listenport=8080 connectaddress=YOUR_IP_HERE connectport=80 

Note, that this will only do IPv4 connections, if you also want to forward IPv6 connections you would also need to do

netsh interface portproxy add v6tov6 listenaddress=YOUR_IP_HERE listenport=8080 connectaddress=YOUR_IP_HERE connectport=80