Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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: (untested). Using a reverse proxy (Google is yout friend) may fit the bill for http-like traffic. Also check this post:

share|improve this answer
Doh, I feel like a dummy now, forgetting the term reverse proxy. As soon as I can up vote I will for you. –  bdavenport Jan 3 '12 at 14:53

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
share|improve this answer
Will this be persistent across reboots? Also the commands are invalid, as I get an error: "one or more essential parameters were not defined" –  sorin Jul 21 at 20:03
@sorin it does persist, I use this in a system where I redirect RDP from the standard port to a nonstandard port and I only need to run this command once when I am setting up a new VM. As for the error, you are correct I forgot a parameter for the address (Which I see you fixed, thanks!) –  Scott Chamberlain Jul 21 at 20:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.