locked
add a new RDP listening port - HOWTO RRS feed

  • Pytanie

  • Hi,

    If you need to add another listening port for your RDP server, for whatever the reason, this howto will show youhow to do it.
    Please notice we need to edit the registry, so it always best to BACKUP the REGISTRY before you doing any edit on it.

    We need to create a new RDP listening port within the registry:

    1 - Run Regedit.exe on your Server.

    2 - Navigate to the following key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

    3 - Export the entire key to a .REG file by selecting the key "click on it" and going to File - Export.

    4 - Give it any name you like (name not important, any name will do).

    5 - Edit the .REG file you've just created
       (Do not double click on the .REG file, instead right click it and choose Edit)
        and change the name of the key at the 3rd line of the file to something like:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp-New

    6 - Then Find: PortNumber

    and change it to whatever port you want. Make sure you write it in hexadecimal format. For example,
    for 3390 you must enter D3E (use calculator in scientific mode to easily convert decimal to hexadecimal format).

    7 - Import the .REG file back to the registry by double clicking on it, and we are done.



    To connect to the Server from the client:

    1 - Go to the Start menu and click on Run.
    2 - On the Run menu type MSTSC and click Enter.
    3 - In the RDP window, in the Computer box, scroll to the computer name or IP to which you wish to connect.
    Code Snippet

    Add a ":Port" (without the quotes) where "Port" is the decimal value of the destination port.



    Another method of connecting to a different port that default is to run the MSTSC command
    with the required command line parameters:

    Code Snippet

    /v:ServerName[:Port]



    For example: MSTSC /v:192.168.1.2:3399 (example port)

    My best,
    Ahmad
    czwartek, 2 sierpnia 2007 10:37

Odpowiedzi

  • Because he wants to. He has something to do which requires an additional RDP port. What is that "something"? Who knows? Who cares?

    Why, specifically, do you feel you need more than 20 GB on the system partition? Because you want to. You have something to do with WHS that you feel requires additional space on the system partition. It doesn't matter (to me) what you need that space for.

    Let it lie.
    piątek, 3 sierpnia 2007 22:47
    Moderator
  •  SME wrote:
     Bezalel Geretz wrote:

    I can see two reasons for doing this.

    1. The router that you use to connect to the internet is using port 3389 for something else (itself, another PC or even another application)
    2. You don't want to expose port 3389 to the internet but still want to use RDP.



    You wouldn't have to add a port to WHS for those, you could just change the port.

     

    The reason to add a port instead of changing it is so that you can still access the server console from the internal clients on the default port.

    niedziela, 5 sierpnia 2007 04:08
  •  Dennisb1 wrote:

     

    why with the register...

    as you go to control panel and then to system administration (or something)

    then to terminal service configuration and you can make one with a GUI and even more settings or change the current one



    I could not find a better way to "ADD" another port beside this one, easy, and fast.

    In windows 2003 server, can you show me the way you did it with "terminal servcice manager"? Or you mean "terminal service configuration"?

    Can you please share the issue here?

    As long I know, you can not do it to add another port, only the one I know above.

    My best.
    piątek, 3 sierpnia 2007 06:05
  •  Ken Warren wrote:
    Start/Control Panel/Administrative Tools/Terminal Services Configuration. Right-click Connections, select Create New Connection. YOu get a wizard to configure a new connection.


    Ken,

    Yes, I know regarding the wizard, my point, win server 2003 will not let add another ports, and the wizard will end with error.

    Eitherway, it is a choice for whom want that howto.

    My best.
    piątek, 3 sierpnia 2007 13:40
  • I can see two reasons for doing this.

    1. The router that you use to connect to the internet is using port 3389 for something else (itself, another PC or even another application)
    2. You don't want to expose port 3389 to the internet but still want to use RDP.
    niedziela, 5 sierpnia 2007 02:05
  •  SME wrote:
     abobader wrote:
    Thanks Ken for taking the time to clear the issue about this howto, well said indeed.

    My best.


    Welcome back.

    It's still not clear to me, why somebody may want and/or need to do this but now I've created another thread to discuss "why" so I'll move on to the next questions; has anyone used this to fix WHS yet and did it actually work for "whatever" it was you were trying?

    "It is a riddle wrapped in a mystery inside an enigma..." -- Sir Winston Churchill




    Thanks SME Smile

    I see Bezalel Geretz give a good some usage of the possiblty for the adding second ports for RD, and I am sure others by time will share thier idea of other possiblty as well if they come cross this howto.

    I have some possiblty as well to involte that with domain group policy, but let wait and see, if maybe the released ver of WHS still have domain support in it, then I will update this howto.

    For the main time, this howto still posted as for port block workaround issue as I said before.

    My best,
    Ahmad


    poniedziałek, 6 sierpnia 2007 06:06

Wszystkie odpowiedzi

  •  

    why with the register...

    as you go to control panel and then to system administration (or something)

    then to terminal service configuration and you can make one with a GUI and even more settings or change the current one

    czwartek, 2 sierpnia 2007 13:33
  •  Dennisb1 wrote:

     

    why with the register...

    as you go to control panel and then to system administration (or something)

    then to terminal service configuration and you can make one with a GUI and even more settings or change the current one



    I cant see a reason to mess with the standard ports, at all. YMMV


    czwartek, 2 sierpnia 2007 18:23
  •  Dennisb1 wrote:

     

    why with the register...

    as you go to control panel and then to system administration (or something)

    then to terminal service configuration and you can make one with a GUI and even more settings or change the current one



    I could not find a better way to "ADD" another port beside this one, easy, and fast.

    In windows 2003 server, can you show me the way you did it with "terminal servcice manager"? Or you mean "terminal service configuration"?

    Can you please share the issue here?

    As long I know, you can not do it to add another port, only the one I know above.

    My best.
    piątek, 3 sierpnia 2007 06:05
  • Start/Control Panel/Administrative Tools/Terminal Services Configuration. Right-click Connections, select Create New Connection. YOu get a wizard to configure a new connection.
    piątek, 3 sierpnia 2007 11:51
    Moderator
  •  Ken Warren wrote:
    Start/Control Panel/Administrative Tools/Terminal Services Configuration. Right-click Connections, select Create New Connection. YOu get a wizard to configure a new connection.

    yes this is what i meant i sed that other from out of the head my WHS server is cureently down because the backup service still wont work

    but this is the way

    piątek, 3 sierpnia 2007 11:55
  •  Ken Warren wrote:
    Start/Control Panel/Administrative Tools/Terminal Services Configuration. Right-click Connections, select Create New Connection. YOu get a wizard to configure a new connection.


    Ken,

    Yes, I know regarding the wizard, my point, win server 2003 will not let add another ports, and the wizard will end with error.

    Eitherway, it is a choice for whom want that howto.

    My best.
    piątek, 3 sierpnia 2007 13:40
  •  abobader wrote:

    Eitherway, it is a choice for whom want that howto.

    My best.


    You still never answered the question of why add more ports when one already exists and works fine?
    piątek, 3 sierpnia 2007 17:51
  • Because he wants to. He has something to do which requires an additional RDP port. What is that "something"? Who knows? Who cares?

    Why, specifically, do you feel you need more than 20 GB on the system partition? Because you want to. You have something to do with WHS that you feel requires additional space on the system partition. It doesn't matter (to me) what you need that space for.

    Let it lie.
    piątek, 3 sierpnia 2007 22:47
    Moderator
  •  Ken Warren wrote:
    Because he wants to. He has something to do which requires an additional RDP port. What is that "something"? Who knows? Who cares?

    Why, specifically, do you feel you need more than 20 GB on the system partition? Because you want to. You have something to do with WHS that you feel requires additional space on the system partition. It doesn't matter (to me) what you need that space for.

    Let it lie.


    There's a difference. The standard port works fine, whereas the 20G limit doesn't provide enough space, not because I want to have more space but because I need more.

    I don't see what's wrong with asking why somebody might need another RDP port since the standard port works fine. It's not going to allow more RDP sessions at once, is it? I can't see a reason to do it, so I asked. If that's bad, on the forums now, just let me know.

    piątek, 3 sierpnia 2007 23:01
  • Thanks Ken for taking the time to clear the issue about this howto, well said indeed.

    My best.
    piątek, 3 sierpnia 2007 23:51
  • The situations are exactly analogous. You have something to do with WHS that requires a system partition larger than default. I'd like to learn why, but honestly, I don't really care, I'm just curious. You've been asked, and you've declined to answer. Fine. Same with Ahmad. He's been asked, he's declined to answer. People aren't continuing to ask you every time you post to one of your tutorials, are they? So why are you continuing to press the point?

    And to make sure that you don't continue to press the point, I'm locking this thread.
    sobota, 4 sierpnia 2007 00:29
    Moderator
  •  abobader wrote:
    Thanks Ken for taking the time to clear the issue about this howto, well said indeed.

    My best.


    Welcome back. Wink

    It's still not clear to me, why somebody may want and/or need to do this but now I've created another thread to discuss "why" so I'll move on to the next questions; has anyone used this to fix WHS yet and did it actually work for "whatever" it was you were trying?

    "It is a riddle wrapped in a mystery inside an enigma..." -- Sir Winston Churchill


    sobota, 4 sierpnia 2007 19:50
  • I can see two reasons for doing this.

    1. The router that you use to connect to the internet is using port 3389 for something else (itself, another PC or even another application)
    2. You don't want to expose port 3389 to the internet but still want to use RDP.
    niedziela, 5 sierpnia 2007 02:05
  •  Bezalel Geretz wrote:

    I can see two reasons for doing this.

    1. The router that you use to connect to the internet is using port 3389 for something else (itself, another PC or even another application)
    2. You don't want to expose port 3389 to the internet but still want to use RDP.


    You wouldn't have to add a port to WHS for those, you could just change the port. Wink
    niedziela, 5 sierpnia 2007 02:09
  •  SME wrote:
     Bezalel Geretz wrote:

    I can see two reasons for doing this.

    1. The router that you use to connect to the internet is using port 3389 for something else (itself, another PC or even another application)
    2. You don't want to expose port 3389 to the internet but still want to use RDP.



    You wouldn't have to add a port to WHS for those, you could just change the port.

     

    The reason to add a port instead of changing it is so that you can still access the server console from the internal clients on the default port.

    niedziela, 5 sierpnia 2007 04:08
  •  Bezalel Geretz wrote:
     SME wrote:
     Bezalel Geretz wrote:

    I can see two reasons for doing this.

    1. The router that you use to connect to the internet is using port 3389 for something else (itself, another PC or even another application)
    2. You don't want to expose port 3389 to the internet but still want to use RDP.



    You wouldn't have to add a port to WHS for those, you could just change the port.

     

    The reason to add a port instead of changing it is so that you can still access the server console from the internal clients on the default port.



    Well, that's better than anything else, so far. Big Smile


    niedziela, 5 sierpnia 2007 04:17
  •  SME wrote:
     abobader wrote:
    Thanks Ken for taking the time to clear the issue about this howto, well said indeed.

    My best.


    Welcome back.

    It's still not clear to me, why somebody may want and/or need to do this but now I've created another thread to discuss "why" so I'll move on to the next questions; has anyone used this to fix WHS yet and did it actually work for "whatever" it was you were trying?

    "It is a riddle wrapped in a mystery inside an enigma..." -- Sir Winston Churchill




    Thanks SME Smile

    I see Bezalel Geretz give a good some usage of the possiblty for the adding second ports for RD, and I am sure others by time will share thier idea of other possiblty as well if they come cross this howto.

    I have some possiblty as well to involte that with domain group policy, but let wait and see, if maybe the released ver of WHS still have domain support in it, then I will update this howto.

    For the main time, this howto still posted as for port block workaround issue as I said before.

    My best,
    Ahmad


    poniedziałek, 6 sierpnia 2007 06:06
  • I too am looking to "ADD" another port for RDP. The reason why I want a "different" port is for security reasons. Once you open an RDP port on a server (fixed IP), you will get plenty of brute force attack on it; ie, plenty of bots trying to "login" to your server through 3389 (standard port).  Changing the default port is one of the deterrent action to eliminate some of these attacks (the Charging Bear theory --when faced with an angry charging bear, you don't need to run faster than the bear, you just need to run faster than the guy next to you).

    The reason why I want to ADD (instead of changing) the default port is because the server is located in a data-centre away from my existing location. I want to setup and test that the new port is up, running and working BEFORE closing the old 3389 port. If the new port doesn't work, I can still connect to the old port to fix it. If I "change" to the new port directly, if things didn't work out (ie, the firewall/router hasn't been set correctly or for whatever reason there is a port clash), I will be stuck and have to travel physically to the data-centre.

    So... has anyone figure how to ADD a new listening port instead of changing it?

    piątek, 2 marca 2012 04:26
  • To ADD another port for RDP. You follow above steps. Before STEP 7 you must also change the first line.

    For example:

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp-3377]

    Then import .reg file. This will crate a new listener for rdp. Tested also on Server 2012 where you DONT have Terminal services configuration.

    wtorek, 12 marca 2013 12:58
  • Let's put a scenario:

    you have a Win server on the cloud, the only way you can "manage" it, is thru RDP. One day you think it's not safe to use default RDP port 3389, so you go ahead change it to 4000, think this way it will be safe because no one can rdp to it EXCEPT you. you changed it, rebooted the server, and now rdp to it with proper :4000 after the IP......... then to find out that you forgot to change the firewall rule and now no one can rdp to it INCLUDING you.........

    środa, 26 kwietnia 2017 20:58
  • For anyone wondering, this allow UDP RDP to work on the new port as well. 
    niedziela, 25 czerwca 2017 22:17