Friday, August 23, 2013

How to change the port RDP is listening on -> Windows Server 2008 r2

This one is super handy for those of us who are into security by obscurity.  The default RDP port is 3389, to change this you need to open regedit and browse to:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber


Right click to edit and select the Base Decimal and change the Value Data to a new port number.  Don't use one of the official ports though: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers



After the change you will need to restart the machine for it to take effect.

Source: http://support.microsoft.com/kb/306759/en-us