Monthly Archives: July 2012

Port forward on Windows 7 / Windows 2008

Recently, a friend of mine asked me for help with the following situation:

  • Wifi network: 192.168.0.*
  • Laptop computer running Windows: (wireless)
  • Gaming console without a a wireless adapter

The console was too far from his Access Point and he couldn’t run cables thoughout his house. He needed to connect to the gaming console from any computer on the wifi network.

He didn’t want to buy additional hardware, like another Access Point, or a wireless adapter for the console.

The obvious solution was to connect the laptop to the console with a cable and do a port forward from the wireless interface of the laptop to the console.

  • Laptop wireless interface:
  • Laptop wired/ethernet interface:
  • Console wired/ethernet interface:

After setting up the IP addresses, the only thing left to do was to set up the port forward on Windows. This can be easily accomplished with the built-in portproxy:

Click on Start and select Run, type cmd.exe but do NOT hit the “Enter” key. Press CTRL+SHIFT+ENTER instead. This way cmd.exe will be run with Administrator privileges.

At the command prompt, enter the following command:

netsh interface portproxy add v4tov4 listenport=7142 connectaddress= connectport=7142 listenaddress= protocol=tcp

In this case, I only needed to forward port 7142. If you need to forward multiple ports just repeat the above command for each port.

After running this command I was able to connect to the console from the wifi network using as the destination IP address/port.

Caveat: portproxy only supports TCP! If you need to proxy udp ports as well, you might want to look into sudppipe.

Alternative solutions: