RDP Port: Changing the Default and Basic Configuration Steps

Quite often, many users who use remote access sessions ask themselves how to change the RDP port. Now let's look at the simplest solutions, as well as indicate a few basic steps in the setup process.

What is the RDP protocol for?

First, a few words about what RDP technology is . If you look at the decoding of the abbreviation, you can understand that this is the Remote Desktop Protocol.

rdp port

In simple terms, it is a means of connecting to a remote desktop, terminal server, or workstation. Windows settings (and any version of the system) use the default settings that are suitable for most users. Nevertheless, sometimes it becomes necessary to change them.

Standard RDP port: do I need to change it?

So, regardless of the modification of Windows, all protocols have a predefined value. This is the RDP 3389 port, which is used for a communication session (connecting one terminal to remote).

What is the situation connected with when the standard value needs to be changed? First of all, only with the security of the local computer. After all, if you understand, with the standard port installed, in principle, any attacker can easily infiltrate the system. So now let's see how to change the default RDP port.

Change settings in the registry

Just note that the change procedure is performed exclusively in manual mode, and there is no reset or installation of new parameters in the remote access client itself.

change rdp port

First, call the standard registry editor using the regedit command in the Run menu (Win + R). Here we are interested in the HKLM branch, in which you need to go down the partition tree through the directory of the terminal server to the RDP-Tcp directory. In the window on the right we find the key PortNumber. We need to change its meaning.

We go into editing and see 00000D3D there. Many are immediately perplexed about what it is. And this is just the hexadecimal representation of the decimal number 3389. To specify the port in decimal form, we use the corresponding line for displaying the value representation, and then we specify the parameter we need.

standard rdp port

After that, we reboot the system, and when trying to connect, specify the new RDP port. Another way to connect is to use the special command mstsc / v: ip_address: XXXXX, where XXXXX is the new port number. But that is not all.

Rules for Windows Firewall

Alas, the built-in Windows firewall can block the new port. So, you need to make changes to the settings of the firewall itself.

port forwarding rdp

We call the firewall settings with advanced security settings. Here you should first select the incoming connections and click on the line for creating a new rule. Now select the rule creation point for the port, then enter its value for TCP, then enable the connection, leave the profile section unchanged, and finally assign the name to the new rule, then click the setup completion button. It remains to reboot the server and when connecting specify a new RDP port through a colon in the corresponding line. In theory, problems should not be observed.

Forwarding the RDP port on the router

In some cases, when a wireless connection is used, rather than a cable one, it may be necessary to forward the port on the router (router). There is nothing complicated about it.

First, in the system properties, we allow remote connection to the computer and specify the users who have the right to do this. Then we go to the router settings menu through the browser (192.168.1.1 or at the end of 0.1 - it all depends on the model of the router). In the field (if the main address is 1.1), it is desirable to indicate the address starting from the third (1.3), and write the rule for issuing the address for the second (1.2).

Then, in network connections, we use the details view, where you need to view the details, copy the physical MAC address from there and paste it into the parameters of the router.

rdp port

Now in the NAT settings section on the modem we turn on the connection to the server, add the rule and specify the port XXXXX, which must be forwarded to the standard RDP 3389 port. We save the changes and reboot the router (the new port will not be accepted without rebooting). You can check the connection on a specialized site like ping.eu in the port testing section. As you can see, everything is simple.

Finally, note that the port values ​​are allocated as follows:

  • 0 - 1023 - ports for low-level system programs;
  • 1024 - 49151 - ports allocated for private purposes;
  • 49152 - 65535 - dynamic private ports.

In general, many users usually choose RDP ports from the third range of the list to avoid problems. However, both experts and experts recommend using these values ​​in the setup, since they are suitable for most tasks.

As for port forwarding, this procedure is mainly used only in cases of Wi-Fi connection. As you can already see, with a normal wired connection it is not required: just change the values ​​of the registry keys and add the rules for the port in the firewall.

Source: https://habr.com/ru/post/C20578/


All Articles