{"id":5469,"date":"2023-11-17T07:33:02","date_gmt":"2023-11-17T07:33:02","guid":{"rendered":"https:\/\/natsav.com\/blog\/?p=5469"},"modified":"2024-02-05T12:41:19","modified_gmt":"2024-02-05T12:41:19","slug":"change-rdp-port-in-window-server","status":"publish","type":"post","link":"https:\/\/natsav.com\/blog\/change-rdp-port-in-window-server\/","title":{"rendered":"How to change RDP port in windows server 2016."},"content":{"rendered":"<p><strong><span style=\"text-decoration: underline; color: #000000;\">Step 1: Open Registry Editor.<\/span><br \/>\n<\/strong>a). Press <code>'Win + R'<\/code> to open the Run dialog.<br \/>\nb). Type <code>'regedit'<\/code> and press Enter to open the Registry Editor.<\/p>\n<p><strong><span style=\"text-decoration: underline; color: #000000;\">Step 2: Navigate to the RDP Port Registry Key.<\/span><br \/>\n<\/strong>* In the Registry Editor, navigate to the following key:-<br \/>\n[ &#8220;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Terminal <span class=\"hljs-built_in\">Server<\/span>\\WinStations\\RDP-Tcp&#8221; ]<\/p>\n<p><span style=\"text-decoration: underline;\"><strong><span style=\"color: #000000; text-decoration: underline;\">Step 3: Locate the &#8220;PortNumber&#8221; Entry.<\/span><br \/>\n<\/strong><\/span>* Look for the entry named <code>'PortNumber'<\/code> on the right side of the Registry Editor.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong><span style=\"color: #000000; text-decoration: underline;\">Step 4: Change the Port Number.<\/span><br \/>\n<\/strong><\/span>a). Double-click on <code>'PortNumber'<\/code> to open the Edit DWORD Value dialog.<br \/>\nb). Choose the Decimal base and enter the desired port number. For example, you might choose <code>'3389'<\/code> for a non-standard port.<br \/>\nc). Click OK to save the changes.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong><span style=\"color: #000000; text-decoration: underline;\">Step 5: Restart the Remote Desktop Services.<\/span><br \/>\n<\/strong><\/span>a). Open a Command Prompt with administrative privileges.<br \/>\nb). Run the following command to restart the Remote Desktop Services:-<br \/>\n[ &#8220;net stop termservice&#8221; ]<br \/>\n[ &#8220;net start termservice&#8221; ]<\/p>\n<p><span style=\"text-decoration: underline;\"><strong><span style=\"color: #000000; text-decoration: underline;\">Step 6: Update Firewall Rules (if necessary).<\/span><br \/>\n<\/strong><\/span>* If you&#8217;re using Windows Firewall or any other firewall, update the rules to allow traffic on the new port.<br \/>\n* For Windows Firewall, open &#8220;Windows Defender Firewall with Advanced Security,&#8221; and update the Inbound Rules for Remote Desktop.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong><span style=\"color: #000000; text-decoration: underline;\">Step 7: Test the Connection.<\/span><br \/>\n<\/strong><\/span>Use the Remote Desktop client to connect to the server using the new port. Specify the port in the format <code>'hostname:port'<\/code> (for e.g., <code>'example.com:3389'<\/code>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step 1: Open Registry Editor. a). Press &#8216;Win + R&#8217; to open the Run dialog. b). Type &#8216;regedit&#8217; and press Enter to open the Registry Editor. Step 2: Navigate to the RDP Port Registry Key. * In the Registry Editor, navigate to the following key:- [ &#8220;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp&#8221; ] Step 3: Locate the &#8220;PortNumber&#8221; Entry. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5506,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[258],"tags":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/natsav.com\/blog\/wp-content\/uploads\/2023\/11\/Server-1-e1700480948899.jpg?fit=717%2C399&ssl=1","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5469"}],"collection":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/comments?post=5469"}],"version-history":[{"count":5,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5469\/revisions"}],"predecessor-version":[{"id":5863,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5469\/revisions\/5863"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media\/5506"}],"wp:attachment":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media?parent=5469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/categories?post=5469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/tags?post=5469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}