Use this when creating inbound firewall rules.
Inbound Rules
Inbound rules allow or block traffic coming into the computer by program, port, protocol, address, profile and interface. The default inbound action blocks anything not explicitly allowed.
1. Get-NetFirewallRule -Direction Inbound -Enabled True | ? DisplayName -like '*<svc>*'.
2. Port/program filters correct?
3. Scope (remote addresses) restricted?
4. Create: New-NetFirewallRule -Direction Inbound -Protocol TCP -LocalPort <p> -RemoteAddress <net> -Action Allow.
5. Test remotely.
inbound packet → matching allow rule (or block) → service
Context & applicabilityCommon mistakes · platform/version boundaries
- Rules created for the wrong profile (Domain/Private/Public).
- Allowing a port to Any remote address when only a few hosts need it.
- Disabling the firewall instead of adding a rule.
- Local rules ignored because GPO sets "Apply local firewall rules: No".
Operational reference
Fast context before you go deeper.
Get-NetFirewallRule -Direction Inbound -Enabled True | Get-NetFirewallPortFilterEvidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Inbound traffic is blocked by default.
- Limit rules by remote address scope.
- Apply rules to the right profile.
Get-NetFirewallProfile— profiles, enabled, default actions, loggingGet-NetFirewallRule -Enabled True -Direction Inbound— enabled inbound rulesGet-NetFirewallRule -DisplayName '<name>' | Get-NetFirewallPortFilter— ports of a rulenetsh advfirewall monitor show firewall— effective state
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Inbound rules allow traffic to listening services; default inbound action is block.
New-NetFirewallRule -DisplayName 'App HTTPS' -Direction Inbound -Protocol TCP -LocalPort 8443 -RemoteAddress 10.0.0.0/8 -Profile Domain -Action Allow
Get-NetFirewallRule -Direction Inbound -Enabled True | Get-NetFirewallPortFilter | ? LocalPort -eq 3389
Enable-NetFirewallRule -DisplayGroup 'Remote Desktop'
Get-NetFirewallRule -DisplayName 'App HTTPS' | Get-NetFirewallAddressFilter
Scope rules by remote address and profile; "Any" remote addresses on Public profile is the usual over-permissive mistake.
ReferenceConfiguration & state2 sections · depth on demand
Creating inbound rules
New-NetFirewallRule -DisplayName "HTTPS in" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow -Profile Domain
New-NetFirewallRule -DisplayName "RDP from admins" -Direction Inbound -Protocol TCP -LocalPort 3389 -RemoteAddress 10.99.0.0/24 -Action Allow
Get-NetFirewallRule -Direction Inbound -Enabled True | Get-NetFirewallPortFilter
Documented example, not captured output. Default inbound action is Block; block rules override allow rules. Limit rules by profile and remote address.
Commands
New-NetFirewallRule -DisplayName "Allow RDP from admin VLAN" -Direction Inbound -Protocol TCP -LocalPort 3389 -RemoteAddress 10.10.99.0/24 -Profile Domain -Action Allow
Get-NetFirewallRule -Enabled True -Direction Inbound | Get-NetFirewallPortFilter | Where LocalPort -eq 3389
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Windows Firewall → Inbound Rules. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows/security/operating-system-security/network-security/windows-firewall/ · confidence 94%