Change Windows remote desktop port number

This tutorial will explain how using registry editor to change the Remote Desktop Protocol (RDP) port number on your Windows 2003 / XP / Vista, Windows 7 .
This will be useful when you are behind a firewall or NAT and the default port 3389 is disabled.

Also, there are many scanning bots ran on hacked servers trying to brute-force the administrator password on other computers with Windows OS. As it takes a lot of resources the whole range of port to be scanned on every server, the bots are set to try only a short range to see whether particular service is running.

Changing the port will decrease the chance your server to become a target of brute-force attacks via Remote Desktop Protocol. Basically this will hide the server from automated scans looking for RPD.

To change the port you will need to start Windows Registry Editor.

Go to : Start -> Run… type ”regedit” and press OK

Change Windows remote desktop port number

Expand the registry folders to:

HKEY_LOCAL_MACHINE > System > CurrentControlSet > Control > TerminalServer > WinStations > RDP-Tcp

Then locate the following registry subkey :


Change Windows remote desktop port number

On the Edit menu, click Modify, and then on the Edit DWORD Value click Decimal which will show us the exact port number.

Change Windows remote desktop port number

Type the new port number, and then click OK button.

Quit Registry Editor and restart your computer.
IMPORTANT!!! – Make sure the firewall has the new port opened! If you do not set access enabled for that specific new port, you wont be able to have access via remote computer.

I hope this tutorial helped you to change Remote Desktop Port


Filed Under: Windows XP

Anthony Gee About the Author: Anthony G. is an IT specialist with more than 9 years of solid working experience in the Web Hosting industry. Currently works as server support administrator, involved in consultative discussions about Web Hosting and server administration. One of the first writers in the website, now writing for Free Tutorials community - he is publishing tutorials and articles for the wide public, as well as specific technical solutions.

Comments (22)

  1. onkar says:

    thanks for help

    • Connect says:

      Confirmed! This tutorial for remote dektop port change works for all Windows XP, Windows Vista, Windows 7.

      I had issues, but it happened my router to block the new port…

  2. Tonny says:

    You are very welcome to visit this tutorial any time

  3. LordAzuzu says:

    Not working for Windows 7.

  4. BMSims says:

    LordAzuzu, make sure when you connect, set machine name to connect to: :

  5. Cris says:

    It works n Win 7! you change the local port from 3389 in 33389 for example and after that u go to firewall, advanced, create new roule, and you add a name for the roule, example new_rdp, add the tcp in port 33389 and select all the services to acces that port.

  6. user says:

    good tutorial, works in W7.

  7. bpa says:

    thanks …

  8. Frederick says:

    Thanks this really helps…

  9. Jon Hartman says:

    You don’t have reboot. You can disable remote access, then re-enable it to achieve the same effect.

  10. keith says:

    HI, I was running my website from my windows xp computer, with dyndns domain running with direct updated.
    I now have a new computer running windows 7 with the same setup, but can not get the website to work, or even RDT to that new pc.

  11. Tonny says:

    Keith the issue seams complicated, and we can help you.
    Just send your questions with details from the request tutorial form.

  12. Larry says:

    Just what I needed, great illistration thank you

  13. Ali says:

    Thank you very much

  14. Alex Peter says:

    It’s recommended and useful.

  15. This is mandatory if you searching for network security improvements!

  16. ali says:

    Great. thanks very much!

  17. Easy says:

    Is it the same port on all windows OS?

  18. Tonny says:

    It is the same for all Windows OS – XP, Vista, 7 – the default remote desktop port number is 3389.

Leave a Reply to pranam