{"id":420,"date":"2026-06-17T02:56:33","date_gmt":"2026-06-17T02:56:33","guid":{"rendered":"https:\/\/windows-vps.org\/blog\/?p=420"},"modified":"2026-08-02T22:25:11","modified_gmt":"2026-08-02T22:25:11","slug":"windows-firewall-windows-vps-rules-profiles-hardening","status":"publish","type":"post","link":"https:\/\/windows-vps.org\/blog\/windows-firewall-windows-vps-rules-profiles-hardening\/","title":{"rendered":"Windows Firewall on a Windows VPS: Rules, Profiles, and Hardening Steps"},"content":{"rendered":"<p class=\"wp-block-paragraph\">A fresh Windows VPS is reachable from the entire public internet within minutes of being provisioned. The built-in Windows Defender Firewall is the only thing standing between your RDP port and the botnets that sweep the IPv4 space every few seconds \u2014 and it is also the component administrators break most often, usually by disabling it \u201ctemporarily\u201d to debug an application. Understanding how firewall profiles and rules actually work is one of the most important Windows Server administration skills you can build.<\/p>\n\n<p class=\"wp-block-paragraph\">Before you harden anything, you need a server worth hardening. If you are still choosing hardware, <a href=\"https:\/\/windows-vps.org\/#providers\">compare Windows VPS plans on our comparison table<\/a> and pick a provider that gives you firewall control at the hypervisor level as well as inside the operating system \u2014 both layers matter.<\/p>\n\n<h2 class=\"wp-block-heading\">Know Your Firewall Profiles<\/h2>\n\n<p class=\"wp-block-paragraph\">Windows Firewall uses three profiles: <strong>Domain<\/strong>, <strong>Private<\/strong>, and <strong>Public<\/strong>. A standalone VPS almost always sits on the Public profile unless it is joined to an Active Directory domain. Rules can be scoped per profile, so a rule that allows RDP on Public does not automatically apply on Private \u2014 and vice versa. Check which profiles are active and what the default inbound action is with:<\/p>\n\n<pre class=\"wp-block-code\"><code>Get-NetFirewallProfile | Select-Object Name, Enabled, DefaultInboundAction<\/code><\/pre>\n\n<p class=\"wp-block-paragraph\">The <code>DefaultInboundAction<\/code> of <code>Block<\/code> is what you want: inbound connections are denied unless an explicit allow rule matches. If a server shows <code>Allow<\/code>, change it back to <code>Block<\/code> immediately.<\/p>\n\n<h2 class=\"wp-block-heading\">Audit What Is Currently Open<\/h2>\n\n<p class=\"wp-block-paragraph\">Before adding rules, inventory what is already listening. Open an elevated PowerShell prompt and run:<\/p>\n\n<pre class=\"wp-block-code\"><code>Get-NetFirewallRule -Direction Inbound -Action Allow -Enabled True | Select-Object DisplayName, Profile\nGet-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort, OwningProcess<\/code><\/pre>\n\n<p class=\"wp-block-paragraph\">Cross-reference the listening ports with your allow rules. Anything listening that has no corresponding rule \u2014 or a rule that applies to <em>all<\/em> profiles \u2014 is a candidate for cleanup.<\/p>\n\n<h2 class=\"wp-block-heading\">Allow RDP \u2014 But Not From Everywhere<\/h2>\n\n<p class=\"wp-block-paragraph\">The classic mistake is a rule that allows RDP (TCP 3389) from any source address. Brute-force scanners hit that port within minutes of a server going online, so restrict it to the IPs that actually need it:<\/p>\n\n<pre class=\"wp-block-code\"><code>New-NetFirewallRule -DisplayName \"RDP from office\" -Direction Inbound -Protocol TCP -LocalPort 3389 -RemoteAddress 203.0.113.10 -Action Allow<\/code><\/pre>\n\n<p class=\"wp-block-paragraph\"><code>RemoteAddress<\/code> accepts single IPs, CIDR ranges such as <code>203.0.113.0\/24<\/code>, and comma-separated lists. If your office IP changes often, keep the OS rule open to your VPN range instead, or manage access through the provider&#8217;s cloud firewall. Update an existing rule without recreating it using <code>Set-NetFirewallRule<\/code>.<\/p>\n\n<h2 class=\"wp-block-heading\">Open Only the Ports Your Workload Needs<\/h2>\n\n<p class=\"wp-block-paragraph\">Web servers need 80 and 443; SQL Server needs 1433; WinRM needs 5985 and 5986. Open exactly what you use and nothing else:<\/p>\n\n<pre class=\"wp-block-code\"><code>New-NetFirewallRule -DisplayName \"IIS HTTPS\" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow<\/code><\/pre>\n\n<p class=\"wp-block-paragraph\">Never expose SQL Server&#8217;s 1433 to the whole internet. Scope it to your application server&#8217;s IP with the same <code>RemoteAddress<\/code> parameter, or keep the database on a private network entirely.<\/p>\n\n<h2 class=\"wp-block-heading\">Common Ports Quick Reference<\/h2>\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Port<\/th><th>Service<\/th><th>Recommended exposure<\/th><\/tr><\/thead><tbody><tr><td>3389<\/td><td>RDP<\/td><td>Restrict to known IPs<\/td><\/tr><tr><td>80 \/ 443<\/td><td>HTTP \/ HTTPS<\/td><td>Open; terminate TLS on IIS<\/td><\/tr><tr><td>1433<\/td><td>SQL Server<\/td><td>Restrict to app servers<\/td><\/tr><tr><td>5985 \/ 5986<\/td><td>WinRM<\/td><td>Restrict to management IPs<\/td><\/tr><\/tbody><\/table><\/figure>\n\n<h2 class=\"wp-block-heading\">Turn On Firewall Logging<\/h2>\n\n<p class=\"wp-block-paragraph\">Logging shows you what the firewall is blocking and reveals scanning behavior early:<\/p>\n\n<pre class=\"wp-block-code\"><code>Set-NetFirewallProfile -Profile Public -LogBlocked True -LogFileName C:\\Windows\\System32\\LogFiles\\Firewall\\pfirewall.log<\/code><\/pre>\n\n<p class=\"wp-block-paragraph\">The log is written to <code>%SystemRoot%\\System32\\LogFiles\\Firewall\\pfirewall.log<\/code>. A steady stream of entries hitting port 3389 from foreign IPs is the signature of a brute-force scan \u2014 your RDP restriction and lockout policy are what keep it harmless.<\/p>\n\n<h2 class=\"wp-block-heading\">Mistakes That Get VPS Servers Hacked<\/h2>\n\n<ul class=\"wp-block-list\"><li>Disabling the firewall \u201cjust for testing\u201d and forgetting to re-enable it<\/li><li>Allowing RDP from any source address<\/li><li>Applying allow rules to all three profiles instead of Public only<\/li><li>Ignoring the provider-level firewall, which leaves ports open even when the OS firewall is correct<\/li><li>Exposing 3389 while weak passwords are still in use<\/li><\/ul>\n\n<p class=\"wp-block-paragraph\">Outbound filtering is rarely needed on a VPS and tends to break Windows Update and licensing services. Leave outbound traffic allowed by default and focus your energy on the inbound rules, where the actual attack surface lives.<\/p>\n\n<h2 class=\"wp-block-heading\">Verify Your Configuration<\/h2>\n\n<p class=\"wp-block-paragraph\">After any change, confirm the rule is enabled and scoped correctly:<\/p>\n\n<pre class=\"wp-block-code\"><code>Get-NetFirewallRule -DisplayName \"RDP from office\" | Select-Object Enabled, Action, Profile<\/code><\/pre>\n\n<p class=\"wp-block-paragraph\">Then test from a machine outside the server:<\/p>\n\n<pre class=\"wp-block-code\"><code>Test-NetConnection 203.0.113.10 -Port 3389<\/code><\/pre>\n\n<p class=\"wp-block-paragraph\">If the test fails from your allowed IP, check the provider-level firewall before touching the OS rules again.<\/p>\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n<p class=\"wp-block-paragraph\">Windows Firewall is not a feature to disable \u2014 it is the foundation of Windows VPS security. Set profiles deliberately, allow inbound traffic only where required, restrict RDP to known addresses, and keep logging enabled. When you provision the next server, <a href=\"https:\/\/windows-vps.org\/#providers\">see the full Windows VPS specs<\/a> on the comparison table and choose a plan with solid network-level filtering. If you want a low-cost environment to practice hardening on, <a href=\"https:\/\/interserver.net\/r\/1067805?url=interserver.net\/vps\/windows-vps.html\" rel=\"noreferrer noopener sponsored\" target=\"_blank\">InterServer&#8217;s Windows VPS<\/a> \u2014 with promo code TRYINTERSERVER covering the first month for about a cent \u2014 is a cheap, safe place to break things and fix them again.<\/p>","protected":false},"excerpt":{"rendered":"<p>Windows Firewall is the first line of defense on an internet-facing Windows VPS. Learn how profiles, inbound rules, and IP restrictions keep RDP and IIS safe.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-420","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>Windows Firewall on a Windows VPS: Rules, Profiles, and Hardening Steps - 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\/windows-firewall-windows-vps-rules-profiles-hardening\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Windows Firewall on a Windows VPS: Rules, Profiles, and Hardening Steps\" \/>\n<meta property=\"og:description\" content=\"Windows Firewall on a Windows VPS: Rules, Profiles, and Hardening Steps\" \/>\n<meta property=\"og:url\" content=\"https:\/\/windows-vps.org\/blog\/windows-firewall-windows-vps-rules-profiles-hardening\/\" \/>\n<meta property=\"og:site_name\" content=\"Windows VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-17T02:56:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-02T22:25:11+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\/windows-firewall-windows-vps-rules-profiles-hardening\/\",\"url\":\"https:\/\/windows-vps.org\/blog\/windows-firewall-windows-vps-rules-profiles-hardening\/\",\"name\":\"Windows Firewall on a Windows VPS: Rules, Profiles, and Hardening Steps - Windows VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\"},\"datePublished\":\"2026-06-17T02:56:33+00:00\",\"dateModified\":\"2026-08-02T22:25:11+00:00\",\"author\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\"},\"breadcrumb\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/windows-firewall-windows-vps-rules-profiles-hardening\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/windows-vps.org\/blog\/windows-firewall-windows-vps-rules-profiles-hardening\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/windows-vps.org\/blog\/windows-firewall-windows-vps-rules-profiles-hardening\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/windows-vps.org\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Windows Firewall on a Windows VPS: Rules, Profiles, and Hardening Steps\"}]},{\"@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":"Windows Firewall on a Windows VPS: Rules, Profiles, and Hardening Steps - 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\/windows-firewall-windows-vps-rules-profiles-hardening\/","og_locale":"en_US","og_type":"article","og_title":"Windows Firewall on a Windows VPS: Rules, Profiles, and Hardening Steps","og_description":"Windows Firewall on a Windows VPS: Rules, Profiles, and Hardening Steps","og_url":"https:\/\/windows-vps.org\/blog\/windows-firewall-windows-vps-rules-profiles-hardening\/","og_site_name":"Windows VPS Blog","article_published_time":"2026-06-17T02:56:33+00:00","article_modified_time":"2026-08-02T22:25:11+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\/windows-firewall-windows-vps-rules-profiles-hardening\/","url":"https:\/\/windows-vps.org\/blog\/windows-firewall-windows-vps-rules-profiles-hardening\/","name":"Windows Firewall on a Windows VPS: Rules, Profiles, and Hardening Steps - Windows VPS Blog","isPartOf":{"@id":"https:\/\/windows-vps.org\/blog\/#website"},"datePublished":"2026-06-17T02:56:33+00:00","dateModified":"2026-08-02T22:25:11+00:00","author":{"@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58"},"breadcrumb":{"@id":"https:\/\/windows-vps.org\/blog\/windows-firewall-windows-vps-rules-profiles-hardening\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/windows-vps.org\/blog\/windows-firewall-windows-vps-rules-profiles-hardening\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/windows-vps.org\/blog\/windows-firewall-windows-vps-rules-profiles-hardening\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/windows-vps.org\/blog\/"},{"@type":"ListItem","position":2,"name":"Windows Firewall on a Windows VPS: Rules, Profiles, and Hardening Steps"}]},{"@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\/420","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=420"}],"version-history":[{"count":4,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/420\/revisions"}],"predecessor-version":[{"id":521,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/420\/revisions\/521"}],"wp:attachment":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/media?parent=420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/categories?post=420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/tags?post=420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}