{"id":167,"date":"2026-05-28T23:23:35","date_gmt":"2026-05-29T06:23:35","guid":{"rendered":"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/"},"modified":"2026-05-28T23:23:35","modified_gmt":"2026-05-29T06:23:35","slug":"how-to-configure-windows-firewall-security-rules","status":"publish","type":"post","link":"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/","title":{"rendered":"How to Configure Windows Firewall: Security Rules for Windows Server"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>Windows Firewall (formally called Windows Defender Firewall with Advanced Security) controls what network traffic is allowed into and out of your server. Every Windows Server deployment \u2014 whether it&#8217;s a self-managed VPS or a <a href=\"https:\/\/www.hostandtech.com\/dedicated\/\">Dedicated Server<\/a> \u2014 ships with it enabled by default, but the default rules are often too permissive for production use.<\/p>\n<p>Most people interact with Windows Firewall only when something stops working \u2014 a web app can&#8217;t reach a database, RDP suddenly drops, or a monitoring agent can&#8217;t phone home. Understanding how to read and write firewall rules proactively saves you hours of that kind of debugging.<\/p>\n<p>This article covers Windows Server 2019 and 2022, using both the GUI (Windows Defender Firewall with Advanced Security) and PowerShell. The concepts apply to Windows Server 2016 as well, with minor UI differences.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>Administrator access to the Windows Server instance<\/li>\n<li>Remote Desktop (RDP) or direct console access<\/li>\n<li>Windows Server 2016, 2019, or 2022<\/li>\n<li>Basic understanding of TCP\/UDP ports (helpful but not required \u2014 explained inline)<\/li>\n<li>If you&#8217;re managing rules remotely, make sure your RDP rule is intact before making changes \u2014 locking yourself out is easier than it sounds<\/li>\n<\/ul>\n<h2>Step-by-Step Instructions<\/h2>\n<h3>Step 1: Open Windows Defender Firewall with Advanced Security<\/h3>\n<p>The basic Windows Firewall panel (Control Panel \u2192 System and Security \u2192 Windows Defender Firewall) only gives you on\/off toggles. You need the Advanced Security console for real rule management.<\/p>\n<p>Press <strong>Win + R<\/strong>, type the following, and press Enter:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-1\"><code class=\"\" data-line=\"\">wf.msc<\/code><\/pre>\n<\/div>\n<p>Alternatively, open <strong>Server Manager \u2192 Tools \u2192 Windows Defender Firewall with Advanced Security<\/strong>.<\/p>\n<p>You&#8217;ll see three panels: the left navigation tree (Inbound Rules, Outbound Rules, Connection Security Rules), a centre list of existing rules, and a right Actions panel.<\/p>\n<h3>Step 2: Understand the Rule Types Before You Touch Anything<\/h3>\n<p>Windows Firewall evaluates rules in this order: explicit block rules win, then explicit allow rules, then the default profile action (block or allow all). This matters because adding an allow rule won&#8217;t override an existing block rule for the same port \u2014 the block wins.<\/p>\n<ul>\n<li><strong>Inbound rules<\/strong> \u2014 control traffic coming into your server (e.g. HTTP on port 80, RDP on port 3389)<\/li>\n<li><strong>Outbound rules<\/strong> \u2014 control traffic leaving your server (e.g. blocking your server from calling out on port 25 to prevent spam relay)<\/li>\n<li><strong>Connection Security Rules<\/strong> \u2014 handle IPsec authentication; you generally won&#8217;t touch these unless you&#8217;re setting up a VPN or domain environment<\/li>\n<\/ul>\n<p>\ud83d\udcdd Note: Windows Firewall uses three profiles \u2014 Domain, Private, and Public. On a standalone server not joined to a domain, your rules typically apply to the Public or Private profile. Check which profile your network adapter is using before you write rules \u2014 a rule scoped to the wrong profile does nothing.<\/p>\n<h3>Step 3: Create an Inbound Rule to Allow a Port<\/h3>\n<p>This is the most common task. Example: you&#8217;ve installed a web application that listens on port 8080, and it&#8217;s not reachable from outside.<\/p>\n<ol>\n<li>In <strong>wf.msc<\/strong>, right-click <strong>Inbound Rules<\/strong> in the left panel and select <strong>New Rule<\/strong>.<\/li>\n<li>Select <strong>Port<\/strong> and click <strong>Next<\/strong>.<\/li>\n<li>Select <strong>TCP<\/strong>, enter <code class=\"\" data-line=\"\">8080<\/code> under <em>Specific local ports<\/em>, and click <strong>Next<\/strong>.<\/li>\n<li>Select <strong>Allow the connection<\/strong> and click <strong>Next<\/strong>.<\/li>\n<li>Check all three profiles (Domain, Private, Public) unless you have a specific reason to restrict it. Click <strong>Next<\/strong>.<\/li>\n<li>Give the rule a descriptive name like <code class=\"\" data-line=\"\">Allow TCP 8080 - Web App<\/code>. Good naming saves you when you&#8217;re troubleshooting at 2 AM.<\/li>\n<li>Click <strong>Finish<\/strong>.<\/li>\n<\/ol>\n<p>To do the same thing in PowerShell (faster when you&#8217;re already in a remote session):<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-2\"><code class=\"\" data-line=\"\">New-NetFirewallRule `\n  -DisplayName &quot;Allow TCP 8080 - Web App&quot; `\n  -Direction Inbound `\n  -Protocol TCP `\n  -LocalPort 8080 `\n  -Action Allow `\n  -Profile Any<\/code><\/pre>\n<\/div>\n<h3>Step 4: Create an Inbound Rule to Block a Port or IP Address<\/h3>\n<p>Blocking specific IPs is useful when you&#8217;re seeing repeated failed login attempts on RDP or SSH-equivalent services. Here&#8217;s how to block an IP from reaching your server entirely:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-3\"><code class=\"\" data-line=\"\">New-NetFirewallRule `\n  -DisplayName &quot;Block Abusive IP 203.0.113.45&quot; `\n  -Direction Inbound `\n  -RemoteAddress 203.0.113.45 `\n  -Action Block `\n  -Profile Any<\/code><\/pre>\n<\/div>\n<p>\u26a0 Warning: Block rules always win over allow rules for the same traffic. If you accidentally block your own IP, you&#8217;ll lose access. Before running any block rule against a broad IP range, verify your own public IP is excluded.<\/p>\n<h3>Step 5: Restrict RDP Access to Specific IP Addresses<\/h3>\n<p>This is one of the single most effective things you can do to harden a Windows server. Leaving RDP open to the world (port 3389, all sources) is asking for brute-force attacks. I&#8217;d strongly recommend scoping it to your office IP or your management VPN range.<\/p>\n<p>First, find the existing RDP allow rule. In <strong>wf.msc \u2192 Inbound Rules<\/strong>, look for <strong>Remote Desktop &#8211; User Mode (TCP-In)<\/strong>. Double-click it.<\/p>\n<ol>\n<li>Go to the <strong>Scope<\/strong> tab.<\/li>\n<li>Under <em>Remote IP address<\/em>, select <strong>These IP addresses<\/strong>.<\/li>\n<li>Click <strong>Add<\/strong> and enter your trusted IP or CIDR range (e.g. <code class=\"\" data-line=\"\">198.51.100.0\/24<\/code>).<\/li>\n<li>Click <strong>OK<\/strong> to save.<\/li>\n<\/ol>\n<p>PowerShell equivalent:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-4\"><code class=\"\" data-line=\"\">Set-NetFirewallRule `\n  -DisplayName &quot;Remote Desktop - User Mode (TCP-In)&quot; `\n  -RemoteAddress 198.51.100.0\/24<\/code><\/pre>\n<\/div>\n<p>\ud83d\udcdd Note: If you&#8217;re on a dynamic home IP, set a reminder to update this rule when your IP changes \u2014 otherwise you&#8217;ll lock yourself out and need console access to fix it. On a Host &amp; Tech dedicated server, you can use the IPMI\/KVM console to recover access in that situation.<\/p>\n<h3>Step 6: Create an Outbound Rule<\/h3>\n<p>By default, Windows Firewall allows all outbound traffic. On a production server, you might want to block outbound SMTP (port 25) to prevent a compromised application from sending spam, or restrict outbound traffic to known destinations only.<\/p>\n<p>To block outbound port 25 (SMTP) except to your authorised mail relay:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-5\"><code class=\"\" data-line=\"\"># First, block all outbound port 25\nNew-NetFirewallRule `\n  -DisplayName &quot;Block Outbound SMTP 25&quot; `\n  -Direction Outbound `\n  -Protocol TCP `\n  -RemotePort 25 `\n  -Action Block `\n  -Profile Any\n\n# Then allow it specifically to your mail relay IP\nNew-NetFirewallRule `\n  -DisplayName &quot;Allow Outbound SMTP to Mail Relay&quot; `\n  -Direction Outbound `\n  -Protocol TCP `\n  -RemotePort 25 `\n  -RemoteAddress 192.0.2.10 `\n  -Action Allow `\n  -Profile Any<\/code><\/pre>\n<\/div>\n<p>\u26a0 Warning: Remember \u2014 block rules win. The block-all rule above will override the allow rule for the relay IP unless you&#8217;re careful. In Windows Firewall, a more specific allow rule does NOT automatically take priority over a broader block rule. You need to set rule priority manually by moving the allow rule above the block rule in the list, or use the <code class=\"\" data-line=\"\">-Priority<\/code> parameter approach with <code class=\"\" data-line=\"\">Set-NetFirewallRule<\/code>.<\/p>\n<p>Actually, the cleanest approach here is to set the allow rule first (lower rule number = higher priority in the list), then set the block. In the GUI, you can drag rules to reorder them within the same action type \u2014 but allow vs. block priority is handled by action type, not position. The real gotcha: <strong>Block always beats Allow for the same traffic match<\/strong>, so you need to make the allow rule more specific (narrower scope) than the block rule. The relay-specific rule above is already more specific, so it will work correctly.<\/p>\n<h3>Step 7: Export and Back Up Your Firewall Rules<\/h3>\n<p>Before deploying to production or making bulk changes, export your current ruleset. You&#8217;ll thank yourself later.<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-6\"><code class=\"\" data-line=\"\">netsh advfirewall export &quot;C:Backupsfirewall-backup.wfw&quot;<\/code><\/pre>\n<\/div>\n<p>To restore it:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-7\"><code class=\"\" data-line=\"\">netsh advfirewall import &quot;C:Backupsfirewall-backup.wfw&quot;<\/code><\/pre>\n<\/div>\n<h2>Common Issues &amp; Troubleshooting<\/h2>\n<h3>Port is open in the firewall but still unreachable from outside<\/h3>\n<p>The firewall rule exists and looks correct, but connections on that port still time out from an external machine. The most common cause isn&#8217;t the Windows Firewall at all \u2014 it&#8217;s a network-level firewall or security group sitting in front of the server. On Host &amp; Tech dedicated servers and VPS plans, check whether there&#8217;s a hardware firewall or ACL configured in your control panel. The Windows Firewall rule is only one layer. Also verify the application is actually bound to the correct interface and port using:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-8\"><code class=\"\" data-line=\"\">netstat -ano | findstr :8080<\/code><\/pre>\n<\/div>\n<p>If nothing shows up, the app isn&#8217;t listening \u2014 the firewall isn&#8217;t the problem.<\/p>\n<h3>RDP connection drops immediately after login<\/h3>\n<p>You connect via RDP, see the desktop briefly, then get disconnected. This is often caused by a firewall rule that allows the initial TCP handshake but blocks follow-up traffic, or a Group Policy that&#8217;s overwriting your custom rules. Run <code class=\"\" data-line=\"\">gpresult \/h C:gp-report.html<\/code> to check applied policies. Also check that the <strong>Remote Desktop &#8211; Shadow (TCP-In)<\/strong> and <strong>Remote Desktop &#8211; User Mode (UDP-In)<\/strong> rules are enabled alongside the TCP rule.<\/p>\n<h3>Windows Firewall rules keep resetting after reboot<\/h3>\n<p>Group Policy is almost always the culprit. If your server is domain-joined, a GPO can overwrite local firewall rules on every policy refresh cycle (every ~90 minutes, plus at boot). Local rules you set manually will get wiped. You need to either configure firewall rules through Group Policy itself, or check with your domain admin to understand what policy is being applied. Use <code class=\"\" data-line=\"\">gpresult \/r<\/code> to see which GPOs are active.<\/p>\n<h3>Allow rule exists but traffic is still blocked<\/h3>\n<p>Check for a conflicting block rule. In <strong>wf.msc<\/strong>, right-click the top-level <strong>Windows Defender Firewall with Advanced Security<\/strong> node and select <strong>Properties<\/strong>. Under each profile tab, check the <em>Inbound connections<\/em> setting \u2014 if it says <strong>Block (default)<\/strong>, any traffic without an explicit allow rule is dropped. More commonly though, there&#8217;s a block rule you&#8217;ve forgotten about. Filter the inbound rules list by the relevant port to see everything that applies.<\/p>\n<h3>Firewall is blocking traffic but Windows Firewall shows it as disabled<\/h3>\n<p>This one trips people up. A third-party security product (CrowdStrike, Sophos, Windows Defender for Endpoint in certain configurations) can enforce network filtering independently of the Windows Firewall service state. Check <strong>Windows Security \u2192 Firewall &amp; network protection<\/strong> to see if a third-party firewall is listed as active. Also check: <code class=\"\" data-line=\"\">Get-NetFirewallProfile | Select-Object Name, Enabled<\/code> in PowerShell to confirm actual profile states.<\/p>\n<h2>FAQ<\/h2>\n<div class=\"ht-faq-section\">\n<h2>Frequently Asked Questions<\/h2>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">How do I allow a specific port through Windows Firewall?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Open wf.msc, right-click Inbound Rules, and select New Rule. Choose Port, select TCP or UDP, enter your port number, and set the action to Allow. Give it a clear name so you can find it later. You can also do this in one PowerShell command using New-NetFirewallRule \u2014 see Step 3 above for the exact syntax.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Does disabling Windows Firewall make my server more secure by reducing complexity?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>No \u2014 and this is a surprisingly common misconception. Disabling Windows Firewall removes a layer of protection without simplifying anything meaningful. If you&#8217;re worried about rule conflicts, fix the specific conflicting rules rather than turning the firewall off entirely. On a publicly accessible server, running without a host-based firewall is a serious risk regardless of what network-level protections are in place.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">How do I check which Windows Firewall rules are currently active via PowerShell?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Run Get-NetFirewallRule -Enabled True to list all active rules. To filter by direction and see port details together, use: Get-NetFirewallRule -Direction Inbound -Enabled True | Get-NetFirewallPortFilter. This gives you a cleaner output than the GUI when you&#8217;re hunting for a specific rule.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Will changes to Windows Firewall rules take effect immediately?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Yes \u2014 Windows Firewall rule changes apply instantly without requiring a restart or service reload. The exception is when Group Policy is involved; GPO-applied rules take effect on the next policy refresh cycle, which happens automatically every 90 minutes or can be forced with gpupdate \/force.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">What&#039;s the difference between Windows Firewall profiles (Domain, Private, Public)?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Windows applies a different firewall profile depending on how it classifies your network connection. Domain applies when the server is joined to a domain and can reach a domain controller. Private is for trusted networks. Public is the most restrictive and applies to unrecognised networks. On a standalone server \u2014 like most VPS or dedicated server setups \u2014 your adapter will typically use the Public profile. Make sure your rules target the correct profile or set them to apply to all three.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Windows Firewall is your first line of defence on any Windows Server. This guide walks you through creating inbound and outbound security rules, locking down ports, and avoiding the common mistakes that leave servers exposed.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[84],"tags":[313,314,315,316,220,188,317,67],"class_list":["post-167","post","type-post","status-publish","format-standard","hentry","category-windows-server","tag-firewall-rules","tag-inbound-rules","tag-outbound-rules","tag-port-filtering","tag-server-security","tag-windows-firewall","tag-windows-firewall-security-rules","tag-windows-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Configure Windows Firewall: Security Rules for Windows Server<\/title>\n<meta name=\"description\" content=\"Learn how to configure Windows Firewall and create security rules on Windows Server. Step-by-step guide covering inbound, outbound, and port rules.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Configure Windows Firewall: Security Rules for Windows Server\" \/>\n<meta property=\"og:description\" content=\"Learn how to configure Windows Firewall and create security rules on Windows Server. Step-by-step guide covering inbound, outbound, and port rules.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/\" \/>\n<meta property=\"og:site_name\" content=\"Host And Tech knowledge base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/stshostandtech\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-29T06:23:35+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:site\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/windows-server\\\/how-to-configure-windows-firewall-security-rules\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/windows-server\\\/how-to-configure-windows-firewall-security-rules\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\"},\"headline\":\"How to Configure Windows Firewall: Security Rules for Windows Server\",\"datePublished\":\"2026-05-29T06:23:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/windows-server\\\/how-to-configure-windows-firewall-security-rules\\\/\"},\"wordCount\":1822,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"keywords\":[\"firewall rules\",\"inbound rules\",\"outbound rules\",\"port filtering\",\"server security\",\"Windows firewall\",\"Windows firewall security rules\",\"Windows Server\"],\"articleSection\":[\"Windows Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/windows-server\\\/how-to-configure-windows-firewall-security-rules\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/windows-server\\\/how-to-configure-windows-firewall-security-rules\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/windows-server\\\/how-to-configure-windows-firewall-security-rules\\\/\",\"name\":\"How to Configure Windows Firewall: Security Rules for Windows Server\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\"},\"datePublished\":\"2026-05-29T06:23:35+00:00\",\"description\":\"Learn how to configure Windows Firewall and create security rules on Windows Server. Step-by-step guide covering inbound, outbound, and port rules.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/windows-server\\\/how-to-configure-windows-firewall-security-rules\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/windows-server\\\/how-to-configure-windows-firewall-security-rules\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/windows-server\\\/how-to-configure-windows-firewall-security-rules\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Configure Windows Firewall: Security Rules for Windows Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"name\":\"Host And Tech knowledge base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\",\"name\":\"Host And Tech knowledge base\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"contentUrl\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"width\":1134,\"height\":395,\"caption\":\"Host And Tech knowledge base\"},\"image\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/stshostandtech\",\"https:\\\/\\\/x.com\\\/stshostandtech\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/hostandtech.com\\\/kb\"],\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/author\\\/admin_fjj7qydm\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Configure Windows Firewall: Security Rules for Windows Server","description":"Learn how to configure Windows Firewall and create security rules on Windows Server. Step-by-step guide covering inbound, outbound, and port rules.","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:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/","og_locale":"en_US","og_type":"article","og_title":"How to Configure Windows Firewall: Security Rules for Windows Server","og_description":"Learn how to configure Windows Firewall and create security rules on Windows Server. Step-by-step guide covering inbound, outbound, and port rules.","og_url":"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/","og_site_name":"Host And Tech knowledge base","article_publisher":"https:\/\/www.facebook.com\/stshostandtech","article_published_time":"2026-05-29T06:23:35+00:00","author":"admin","twitter_card":"summary_large_image","twitter_creator":"@stshostandtech","twitter_site":"@stshostandtech","twitter_misc":{"Written by":"admin","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/#article","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/"},"author":{"name":"admin","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee"},"headline":"How to Configure Windows Firewall: Security Rules for Windows Server","datePublished":"2026-05-29T06:23:35+00:00","mainEntityOfPage":{"@id":"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/"},"wordCount":1822,"commentCount":0,"publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"keywords":["firewall rules","inbound rules","outbound rules","port filtering","server security","Windows firewall","Windows firewall security rules","Windows Server"],"articleSection":["Windows Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/","url":"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/","name":"How to Configure Windows Firewall: Security Rules for Windows Server","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/#website"},"datePublished":"2026-05-29T06:23:35+00:00","description":"Learn how to configure Windows Firewall and create security rules on Windows Server. Step-by-step guide covering inbound, outbound, and port rules.","breadcrumb":{"@id":"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/hostandtech.com\/kb\/windows-server\/how-to-configure-windows-firewall-security-rules\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostandtech.com\/kb\/"},{"@type":"ListItem","position":2,"name":"How to Configure Windows Firewall: Security Rules for Windows Server"}]},{"@type":"WebSite","@id":"https:\/\/hostandtech.com\/kb\/#website","url":"https:\/\/hostandtech.com\/kb\/","name":"Host And Tech knowledge base","description":"","publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostandtech.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hostandtech.com\/kb\/#organization","name":"Host And Tech knowledge base","url":"https:\/\/hostandtech.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","contentUrl":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","width":1134,"height":395,"caption":"Host And Tech knowledge base"},"image":{"@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/stshostandtech","https:\/\/x.com\/stshostandtech"]},{"@type":"Person","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/hostandtech.com\/kb"],"url":"https:\/\/hostandtech.com\/kb\/author\/admin_fjj7qydm\/"}]}},"_links":{"self":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/comments?post=167"}],"version-history":[{"count":0,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/167\/revisions"}],"wp:attachment":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/media?parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/categories?post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/tags?post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}