Change Windows Server RDP Port

Changing the port is necessary because leaving the default makes it easier for potential attackers to find opportunities to connect to the server. First you need to open the port.

You can open the port from the command line. Important! In the command below, instead of NEW_PORT, enter the number of the port you want to replace the default RDP port with.

netsh advfirewall firewall add rule name="Custom RDP Port" dir=in action=allow protocol=TCP localport=NEW_PORT

or in another way:

Then go to "Control Panel" - "Windows Firewall" - "Advanced Options"

In the window that appears, select "New rule"


Next, we indicate the port that you specified in paragraph 3, the rule that will be applied to connections to this port, network types (only local, or external too) and the name for the rule.


Change port

Open the registry editor, for this press Win + R and type regedit

Open the branch
HKEY_LOCAL_MACHINE \ System \ CurrentControlSet \ Control \ TerminalServer \ WinStations \ RDP-Tcp

Select the PortNumber parameter, select Decimal and change the value for it to the number of the port that you plan to use, for example, 55555 (by default 3389)

How useful was this article?

VAT

  • Other

    Other

    0%
  • austria

    Austria

    20%
  • Belgium

    Belgium

    21%
  • Bulgaria

    Bulgaria

    20%
  • Croatia

    Croatia

    25%
  • Cyprus

    Cyprus

    19%
  • Czech Republic

    Czech Republic

    21%
  • Denmark

    Denmark

    25%
  • Estonia

    Estonia

    22%
  • France

    France

    20%
  • Finland

    Finland

    24%
  • Germany

    Germany

    19%
  • Greece

    Greece

    24%
  • Hungary

    Hungary

    27%
  • Ireland

    Ireland

    23%
  • Italy

    Italy

    22%
  • Latvia

    Latvia

    21%
  • Lithuania

    Lithuania

    21%
  • Luxembourg

    Luxembourg

    17%
  • Malta

    Malta

    18%
  • Netherlands

    Netherlands

    21%
  • Poland

    Poland

    23%
  • Portugal

    Portugal

    23%
  • Romania

    Romania

    19%
  • Slovakia

    Slovakia

    20%
  • Slovenia

    Slovenia

    %
  • Spain

    Spain

    21%
  • Sweden

    Sweden

    25%
  • USA

    USA

    0%
european
states
  • Other
  • canada
  • poland
  • european-union
  • france
  • germany
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria