{"id":711,"date":"2026-08-31T02:09:13","date_gmt":"2026-08-31T02:09:13","guid":{"rendered":"https:\/\/windows-vps.org\/blog\/?p=711"},"modified":"2026-08-31T02:09:13","modified_gmt":"2026-08-31T02:09:13","slug":"secure-remote-desktop-rdp-setup-windows-server","status":"publish","type":"post","link":"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/","title":{"rendered":"How to Set Up Remote Desktop (RDP) Securely on Windows Server"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Remote Desktop Protocol (RDP) is the primary way administrators connect to Windows Server. Out of the box, RDP is functional but not hardened \u2014 it listens on port 3389, accepts password authentication, and trusts the default self-signed certificate. This guide walks through a complete RDP setup on Windows Server 2022 and 2025, with security configurations that block the most common attack vectors while keeping remote access reliable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Initial RDP Enablement<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">RDP is disabled by default on Windows Server. Enable it via PowerShell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-ItemProperty -Path 'HKLM:\\System\\CurrentControlSet\\Control\\Terminal Server' -Name \"fDenyTSConnections\" -Value 0\nEnable-NetFirewallRule -DisplayGroup \"Remote Desktop\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This enables RDP and opens the firewall port. By default, only members of the local Administrators group can connect. Add specific users with <code>Add-LocalGroupMember -Group \"Remote Desktop Users\" -Member \"username\"<\/code> to grant RDP access without granting full administrator privileges.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Network Level Authentication (NLA)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">NLA requires the client to authenticate before establishing a full RDP session. This prevents resource exhaustion attacks and reduces the attack surface. NLA is enabled by default on Windows Server 2022 and later, but verify the setting:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp' -Name UserAuthentication<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A value of 1 means NLA is required. If it is 0, set it with <code>Set-ItemProperty<\/code>. NLA must be supported by the client \u2014 Windows 10\/11, Windows Server 2012+, and the latest macOS Remote Desktop client all support it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring RDP with a Proper TLS Certificate<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The default self-signed certificate used by RDP triggers a warning on every connection. For production environments, bind a trusted SSL certificate to the RDP listener:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Obtain a certificate from a public CA (Let&#8217;s Encrypt, DigiCert, etc.) or your internal PKI with the server&#8217;s FQDN in the subject or SAN.<\/li>\n<li>Ensure the certificate has the <strong>Server Authentication<\/strong> (1.3.6.1.5.5.7.3.1) extended key usage.<\/li>\n<li>Store the certificate in the local machine&#8217;s Personal certificate store.<\/li>\n<li>Use the certificate&#8217;s thumbprint to bind it to the RDP service.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">After setting the certificate, restart the Terminal Services service: <code>Restart-Service TermService -Force<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Account Lockout Policies to Stop Brute Force<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">RDP is a common target for brute-force attacks. Configure account lockout policies via Local Security Policy:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Policy<\/th><th>Recommended Setting<\/th><\/tr><\/thead><tbody><tr><td>Account lockout threshold<\/td><td>10 invalid logon attempts<\/td><\/tr><tr><td>Account lockout duration<\/td><td>30 minutes<\/td><\/tr><tr><td>Reset account lockout counter after<\/td><td>30 minutes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Set these via PowerShell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>net accounts \/lockoutthreshold:10 \/lockoutduration:30 \/lockoutwindow:30<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This prevents attackers from trying thousands of passwords. Combined with NLA, the lockout is enforced before the RDP session is established.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Changing the Default RDP Port<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Changing the RDP port from 3389 to a non-standard port reduces automated scanning noise. While this is not a security measure against a determined attacker, it eliminates the constant background noise from port scanners:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp' -Name PortNumber -Value 3390\nRestart-Service TermService -Force\nNew-NetFirewallRule -DisplayName \"RDP-3390\" -Direction Inbound -Protocol TCP -LocalPort 3390 -Action Allow<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Remove the old firewall rule for port 3389 and replace it with a custom rule for your new port. Remember to update your firewall rules at the provider level as well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">RDP Session Timeout and Idle Limits<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Disconnected RDP sessions accumulate and consume server resources. Set idle timeouts and automatic disconnection:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp' -Name MaxIdleTime -Value 600000\nSet-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp' -Name MaxDisconnectionTime -Value 300000<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">These settings log off idle sessions after 10 minutes of inactivity and terminate disconnected sessions after 5 minutes, freeing up license and memory resources.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Restricting RDP Access by IP Address<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For servers with a fixed set of administrators, restrict RDP access to specific IP addresses using Windows Defender Firewall with Advanced Security:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$rule = Get-NetFirewallRule -DisplayGroup \"Remote Desktop\"\n$rule | Set-NetFirewallRule -RemoteAddress \"203.0.113.0\/24\",\"198.51.100.0\/24\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is one of the most effective RDP hardening measures. Even a brute-force attack against a strong password fails if the attacker&#8217;s IP address is not in the allowed range.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Auditing RDP Logins<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Enable audit logging for logon events to track RDP access:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>auditpol \/set \/subcategory:\"Logon\" \/success:enable \/failure:enable<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Monitor Event ID 4624 (successful logon) and 4625 (failed logon) from the Security event log. A sudden spike in 4625 events from the same source IP is a strong indicator of a brute-force attack in progress.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A secure RDP setup on Windows Server requires more than just enabling Remote Desktop. NLA, proper TLS certificates, account lockout policies, IP address restrictions, and session timeouts work together to create a layered defense. Start with NLA and account lockout (they stop the most common attacks), then add certificate binding and IP restrictions for stronger protection. For hosting providers that offer managed RDP access, <a href=\"https:\/\/windows-vps.org\/\">compare Windows VPS plans on our comparison table<\/a> to find a configuration that balances security and accessibility for your team.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Remote Desktop Protocol (RDP) is the primary way administrators connect to Windows Server. Out of the box, RDP is functional but not hardened \u2014 it listens on port 3389, accepts password authentication, and trusts the default self-signed certificate. This guide walks through a complete RDP setup on Windows Server 2022 and 2025, with security configurations &#8230; <a title=\"How to Set Up Remote Desktop (RDP) Securely on Windows Server\" class=\"read-more\" href=\"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/\" aria-label=\"Read more about How to Set Up Remote Desktop (RDP) Securely on Windows Server\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":5,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-711","post","type-post","status-publish","format-standard","hentry","category-tutorials-guides"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Set Up Remote Desktop (RDP) Securely on Windows Server - Windows VPS Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set Up Remote Desktop (RDP) Securely on Windows Server\" \/>\n<meta property=\"og:description\" content=\"How to Set Up Remote Desktop (RDP) Securely on Windows Server\" \/>\n<meta property=\"og:url\" content=\"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Windows VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-31T02:09:13+00:00\" \/>\n<meta name=\"author\" content=\"windows-vps\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"windows-vps\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/\",\"url\":\"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/\",\"name\":\"How to Set Up Remote Desktop (RDP) Securely on Windows Server - Windows VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\"},\"datePublished\":\"2026-08-31T02:09:13+00:00\",\"author\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\"},\"breadcrumb\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/windows-vps.org\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Set Up Remote Desktop (RDP) Securely on Windows Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\",\"url\":\"https:\/\/windows-vps.org\/blog\/\",\"name\":\"Windows VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/windows-vps.org\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\",\"name\":\"windows-vps\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"caption\":\"windows-vps\"},\"sameAs\":[\"https:\/\/windows-vps.org\/blog\"],\"url\":\"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Set Up Remote Desktop (RDP) Securely on Windows Server - Windows VPS Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/","og_locale":"en_US","og_type":"article","og_title":"How to Set Up Remote Desktop (RDP) Securely on Windows Server","og_description":"How to Set Up Remote Desktop (RDP) Securely on Windows Server","og_url":"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/","og_site_name":"Windows VPS Blog","article_published_time":"2026-08-31T02:09:13+00:00","author":"windows-vps","twitter_card":"summary_large_image","twitter_misc":{"Written by":"windows-vps","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/","url":"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/","name":"How to Set Up Remote Desktop (RDP) Securely on Windows Server - Windows VPS Blog","isPartOf":{"@id":"https:\/\/windows-vps.org\/blog\/#website"},"datePublished":"2026-08-31T02:09:13+00:00","author":{"@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58"},"breadcrumb":{"@id":"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/windows-vps.org\/blog\/secure-remote-desktop-rdp-setup-windows-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/windows-vps.org\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Set Up Remote Desktop (RDP) Securely on Windows Server"}]},{"@type":"WebSite","@id":"https:\/\/windows-vps.org\/blog\/#website","url":"https:\/\/windows-vps.org\/blog\/","name":"Windows VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/windows-vps.org\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58","name":"windows-vps","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","caption":"windows-vps"},"sameAs":["https:\/\/windows-vps.org\/blog"],"url":"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/"}]}},"_links":{"self":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/comments?post=711"}],"version-history":[{"count":1,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/711\/revisions"}],"predecessor-version":[{"id":713,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/711\/revisions\/713"}],"wp:attachment":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/media?parent=711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/categories?post=711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/tags?post=711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}