How-to-simply...

Change remote desktop RDP port in Windows server 2008 R2

  • 1 Win+R regedit
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp
    PortNumber->Modify select 'decimal' and enter new port number
  • 2 Add new rule to windows firewall
    RC on Inbound rules->New rule
    Rule type: Port
    Protocols and Ports: TCP, enter your new port number in 'Specific local ports'
    Action: Allow connection
    Profile: Domain, Private and Public (check all)
    Name: Remote Desktop Custom (TCP-In)
    Finish
  • 3 Refresh inbound rules and select 'Remote Desktop Custom (TCP-In)'
    Right click->Properties, in the Scope tab you can add specific remote IP address
  • 4 Right click on your new rule in Inbound rules and select 'Enable rule'
    Logout from your session and test if it works
  • 5 Disable or delete old Remote Desktop (TCP-In) rule
    Right click->Disable Rule
  • N Important thing is to not disable existing rule before new one is enabled.
    Otherwise you will not be able to connect to your server.
    Good practice should be to create new rule, test if it works and then disable the old one.
    Better choice should be to not use RDP and switch to VNC cause RDP has security issues from time to time.

References