I have a server service that uses 8182 port. Somebody want to connect to this, but 8182 port is unavailable for him, only 5118 is working fine.

No problem I thought, I just install port forwarder software (service), I set to: "If somebody is connecting to 5118, I redirect to 8182".

But I didn't find any trustable (and freeware) good software for this. I tried Rouvali Windows Port Forwarding Service, but it only shows an error on log.

I have no control over the router, because this is a virtual, leased server.

So please suggest me some freeware Windows service (application) that can redirect this port in persistent mode.


The netsh was not really succesful.

First the netstat don't show the bound port.

But next I found this article. This said that I need to install IPv6 support.

I installed it, and restarted the server. After this the netstat shows the needed port, but on connect (locally or remote) I got:

Socket error: An existing connection was forcibly closed by the remote host. (10054), on  API 'recv'

What would be the next step?

  • I solved this to use the outer IP, and not local... – durumdara Jun 29 '11 at 8:03
up vote 7 down vote accepted
netsh interface portproxy add v4tov4 5118 8182
netsh interface portproxy add v6tov6 5118 ::1 8182

Note that the service will see the user as connecting from "localhost", which may be undesirable for logging purposes.

  • Hi! I type your example, but nothing happened. 1.) netstat don't show anything 2.) I cannot connect. May I must start a service, or do some restart, etc? Thanks! – durumdara Jun 28 '11 at 6:56

Neither of these worked for me. However the port of rinetd worked well. http://codewut.de/Port-Redirection-with-Windows

  • 2
    Welcome to Superuser, could you post all relevant information to your answer from that link into your answer to avoid link rot – 50-3 Oct 1 '13 at 23:12
  • As @50-3 said, please include all relevant information. It's okay to link things, but include as much from the link in your answer as possible. One to two line answers are generally frowned upon. :C – DanteTheEgregore Oct 1 '13 at 23:51
  • netsh is too buggy to be useful. rinetd is really good & portable solution. – Vitaliy Jun 14 '16 at 8:25

"IP Helper" service must be enabled and running !

You can also try:

netsh routing ip nat add portmapping "LAN NAME" tcp 5118 8182

Where is the target server ip.

If port 5118 comes from internet this port has to be open in your firewall/router.

found on a forum :

You need to install IPv6 (Run->Settings->Control Panel->Network Connections->Local Area Connection->Properties->Install->Protocol->Microsoft TCP/IP version 6), otherwise this feature won’t work. It’s a known bug in netsh and it doesn’t look like Microsoft is going to fix it.

and here is the Microsoft KB article :


protected by bwDraco Jun 29 '15 at 3:49

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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