Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows Server » How to create a Windows firewall rule on Windows
  • Screenshot 2020 07 25 at 13.09.08
    Fix the following error occurred when DNS was queried for the service location Windows Server
  • git default branch min
    Git config –global init.defaultBranch: Error cannot lock ref ‘refs/remotes/origin/windows’, not a directory Version Control System
  • image 10
    How to use Microsoft SQL Server Management Studio to Export and Import your MsSQL database from Azure to local computer AWS/Azure/OpenShift
  • screenshot 2020 05 11 at 20.25.01
    How to remove (uninstall) a printer on a macOS Mac
  • sonarcloud
    How to Integrate SonarCloud with Azure DevOps Pipeline AWS/Azure/OpenShift
  • Add additional Windows drives
    How to Add Another Hard Drive to a Virtual Machine in HyperV  Virtualization
  • Fix OneDrive Error
    How to Fix OneDrive Error 0x80071129: The tag present in the reparse point buffer is invalid Windows
  • Check the BIOS version
    How to check the BIOS version on Windows Windows

How to create a Windows firewall rule on Windows

Posted on 26/03/202003/07/2025 Christian By Christian No Comments on How to create a Windows firewall rule on Windows
create Windows firewall rule

In this article, we shall discuss how to create a Windows firewall rule on Windows. Windows Firewall filters incoming traffic to help block unwanted network traffic. Optionally, Windows Firewall can also filter outgoing traffic to help limit the risk of malware. Please refer to these similar guides. How to resolve request timed out when pinging and how to create a Firewall rule, how to resolve request timed out when pinging, and Could not open a connection to the host, on the port, connect failed.

Although Windows Firewall’s default settings will work well with components built into Windows, they might prevent other applications from functioning correctly.

Windows Firewall’s default settings can also be significantly improved to provide even stronger protection by requiring authorization or limiting the scope of allowed connections.

You can also create this rule via the Windows Firewall (Windows Defender Firewall and Advanced Security, PowerShell as well.

Create Windows Firewall Rule

The firewall windows can be accessed via the following path

  • Control Panel, System and Security, and Windows Defender Firewall
Windows firewall

This will open the Windows Firewall “Advanced Settings and Advanced Security” as shown below. In order to create an inbound filter, follow these steps:

Program: A rule that allows or blocks connections for a specific executable file, regardless of the port numbers it might use. You should use the Program rule type whenever possible. The only time it’s not possible to use the Program rule type is when a service does not have its own executable.

Port: A rule that allows or blocks communications for a specific TCP or UDP port number, regardless of the program generating the traffic.

Predefined: A rule that controls connections for a Windows component, such as Active Directory Domain Services, File And Printer Sharing, or Remote Desktop. Typically, Windows enables these rules automatically.

Custom: A rule that can combine program and port information.

firewall rule

Specify the program

In this method, you have got two options. You can choose to exclude WAC from the firewall or create a firewall rule with for the TCP/IP

I will opt for the option to exclude the program option and select the program path

%ProgramFiles%\Windows Admin Center\sme.exe
Windows OS

Click to allow connections to the program as shown below

create Windows firewall rule

Select the profile it should apply to. Since this is a test environment, I will select all the profiles as shown below. The firewall profiles are:

Domain: Applies when a computer is connected to its Active Directory domain. Specifically, any time a member computer’s domain controller is accessible, this profile will be applied.

Private: Applies when a computer is connected to a private network location. By default, no networks are considered private—users must specifically mark a network location, such as their home office network, as private.

Public: The default profile applied to all networks when a domain controller is not available. For example, the Public profile is applied when users connect to Wi-Fi hotspots at airports or coffee shops. By default, the Public profile allows outgoing connections but blocks all incoming traffic that is not part of an existing connection.

Enter the firewall name and description of the rule and click on Finish

Note: Further parameters can be configured to permit traffic from certain IP ranges etc. For more information.

I hope you found this blog post on how to create a Windows firewall rule on Windows helpful. If you have any questions, please let me know in the comment session.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Windows Server Tags:Firewall

Post navigation

Previous Post: How to create a scheduled task with Windows Admin Center
Next Post: Shortcut for Windows update: How to create a shortcut for Windows scheduled task

Related Posts

  • original
    Windows Deployment Services: WDSUTIL CommandLine Options on Windows Server 2019 Windows Server
  • Install and report or install or shutdown with BitLocker
    BitLocker Windows Update Shutdown or Reboot option behavior Windows
  • WinRM set up for specific IP
    Configure WinRM to accept connection from a specific IP Address Windows
  • enable WinRM
    WSManFault Message 2144108526 0x80338012: Fix the client cannot connect to the destination specified in the request Windows Server
  • 33
    The wim file needs to be remounted: Fix error 0xc1510114 Windows Server
  • Windows Server
    Migrate Roles and Features to Windows Server 2022 using WSMT Windows

More Related Articles

original Windows Deployment Services: WDSUTIL CommandLine Options on Windows Server 2019 Windows Server
Install and report or install or shutdown with BitLocker BitLocker Windows Update Shutdown or Reboot option behavior Windows
WinRM set up for specific IP Configure WinRM to accept connection from a specific IP Address Windows
enable WinRM WSManFault Message 2144108526 0x80338012: Fix the client cannot connect to the destination specified in the request Windows Server
33 The wim file needs to be remounted: Fix error 0xc1510114 Windows Server
Windows Server Migrate Roles and Features to Windows Server 2022 using WSMT Windows

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Screenshot 2020 07 25 at 13.09.08
    Fix the following error occurred when DNS was queried for the service location Windows Server
  • git default branch min
    Git config –global init.defaultBranch: Error cannot lock ref ‘refs/remotes/origin/windows’, not a directory Version Control System
  • image 10
    How to use Microsoft SQL Server Management Studio to Export and Import your MsSQL database from Azure to local computer AWS/Azure/OpenShift
  • screenshot 2020 05 11 at 20.25.01
    How to remove (uninstall) a printer on a macOS Mac
  • sonarcloud
    How to Integrate SonarCloud with Azure DevOps Pipeline AWS/Azure/OpenShift
  • Add additional Windows drives
    How to Add Another Hard Drive to a Virtual Machine in HyperV  Virtualization
  • Fix OneDrive Error
    How to Fix OneDrive Error 0x80071129: The tag present in the reparse point buffer is invalid Windows
  • Check the BIOS version
    How to check the BIOS version on Windows Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,836 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.