Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to remap a TCP port from a program were you not can change the port number?

The program talks on port 4321 and I want it to go out on port 14321 on the local computer.

share|improve this question
Read up on netsh. Disregard for the moment the lack of Windows 7 mention. The command is there. Let us know how you make out. – Solemnity Jan 5 '13 at 8:22

The other answer(from sttr) mentioned netsh but gave a command that doesn't work, even when you change his delete to an add.

This works though. Amend as you require.

C:\Users\user>netsh interface portproxy add v4tov4 listenport=4321 connectaddress= connectport=47<ENTER>

And you can use netstat -aon | find ":4321" to check that before the command nothing is running on port 4321, and after it, there is a server listening.

share|improve this answer
netsh interface portproxy delete v4tov4 listenport=4321 connectaddress=<need your IP> connectport=14321 
share|improve this answer
Rather than just posting a line of code, could you please explain what that does, exactly? It would help others to adapt this to their own needs, for example. – slhck Jan 5 '13 at 15:38
I would have assumed add is more useful in this situation than delete. – Oliver Salzburg Jan 5 '13 at 18:50
port forwarder and answer) – STTR Jan 5 '13 at 19:57
What does "port forwarder and answer)" mean? As I said, it'd be great to explain the code you're posting. Also, delete really doesn't seem to make sense for me here. – slhck Jan 5 '13 at 20:01
I supose he does want add but the 3 parameters he has there are listen on port blah, and forward or remap to that IP that PORT – barlop Jun 8 '14 at 16:09

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.