Question

I need to be able to map and IP and Port to another IP and Port on my Windows 7 machine. The reason is enable me to access a URL in another location on a different port than the one I get given from the link.

For example if a link will route me to

123.123.123.123:8080

I want to be able to intercept this (like how the Windows Hosts file works with domain name resolution overriding) to re-route the request to

123.456.789.123:49120

I've quickly found out you can't specify ports in hosts files but netsh appears to do the job although the information on Technet is a little confusing and I'm unsure on how the command should look

Was it helpful?

Solution

the netsh command would look like this:

netsh interface portproxy add v4tov4 listenport=8080 listenaddress=123.123.123.123 connectport=49120 connectaddress=123.456.789.123

More information here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top