Changing Ports for the Remote Desk Protocol
This article explains how to change the ports for the Remote Desk Protocol.
January 18, 2023
AUTHOR(S):
No items found.
Article tags:
No items found.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Share this article
This article is part of THE FOLLOWING SERIES:
Cybersecurity Series

This article explains how to change the ports for the Remote Desk Protocol (RDP).

Steps

  1. If you cannot connect to the server, then restart the server.

  1. Connect to the server.

Note. Recommended via web or VNC, or via RDP if necessary.

  1. Open the registry editor.
  • Go to: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp.
  • Double-click on PortNumber.
  • Click on Decimal.
  • Enter the new port number, then click OK.
  • Close the registry editor.

  1. Click on the Start button.
  • Open Windows Defender Firewall with Advanced Security.
  • Click on Inbound Rule.
  • Click on New Rule.
  • Select Port.
  • Click Next.
  • Choose either TCP or UDP.
  • Choose Specific local ports.
  • Enter the new local port number.
  • Click Next.
  • Choose Allow connections.
  • Give it a name.

Note. Make sure the new name has the new local port number in it.

  • Click Finish.
  • Repeat sub steps "Click on New Rule" through "Click Finish" using the other option from step "Choose either TCP or UDP."

Note. If you did TCP first, then do UDP second and vice versa. Skip this step if you have already completed this process for both TCP and UDP.

  1. Click on the Start button.
  • Open Azure and go to the VM you are currently editing.
  • On the left-hand side, select Networking (located under Settings).
  • Delete the old port.

  1. Add a new incoming port for the port you just added in the steps above.
  • Click on Add inbound port rule.
  • Fill in the information in the pop-up window.
  • Make sure the Destination Port Ranges is set to the port you added in step 4 "Enter the new local port number."
  • Click Add.

Note. If there is a port you want to change, then you can edit it instead of adding a new one.

  1. Type Services and press enter.
  • Right-click on Remote Desktop Service and select Restart.
  • Reconnect to the server.

  1. Go back to the Windows Defender Firewall with Advanced Security.
  • Delete the old port that got replaced.

  1. The process is now complete!

After following the steps in this article, you will have successfully changed ports for the Remote Desk Protocol.

Don't miss any update on this topic.
Sign up for our newsletter to receive a personalized collection of our most recent articles, blog posts, videos, and more, curated specifically for you based on your interests.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.