How to redirect one IP to another IP using netsh (or similar windows software)?

-1

I have gone and:

  1. forgot the password to my remote windows server (with weeks worth of work backed up on it)
  2. changed the IP address of the remote windows server

Now the only way possible that I can login to my server via RDP is to redirect one IP to another IP address.

I have tried to do this in the hosts file like this:

ip_new ip_old

but that didn't work because the hosts file is only for domains...

Anybody have an idea on how to redirect one IP address to another without too much trouble?

darkAsPitch

Posted 2012-07-27T19:32:11.717

Reputation: 1 036

2I'm not sure what you're trying to do here. If the remoe server's IP address has changed, then you need to RDP to the new IP address or it simply won't get the connection. But since you've forgotten the password, once RDP establishes the connection, you're stuck anyway as you won't be able to login. – StarNamer – 2012-07-27T19:37:05.870

Answers

0

You need a program in the middle that listens to traffic on a given IP address+port (i.e. socket) and copies it to a different IP address+port. You may be able to do it with weird routing rules but your internet access may suffer as a result.

A good program for this purpose on Windows is Trivial Proxy. The port in question is 3389.

Please note that:

  1. you can't redirect traffic after it leaves your computer, unless you control an intermediate device leading to it (such as the router in front of the server)
  2. if you are behind a NAT router Trivial Proxy won't work (the destination computer won't be able to connect back to you)

Also there is still the matter of your password. Good luck.

LawrenceC

Posted 2012-07-27T19:32:11.717

Reputation: 63 487