Pcornel
Browse topics
Options
Recent
Favorites
Windows · Technical reference

Inbound Rules

Direct answer

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.

When to use this

Use this when creating inbound firewall rules.

First 30 seconds

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.

Operational verification

inbound packet → matching allow rule (or block) → service

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • 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".
Platform / version applicability
Windows networking and network services
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformWindows networking and network services
Key commandGet-NetFirewallRule -Direction Inbound -Enabled True | Get-NetFirewallPortFilter
Scope / prerequisiteUse this when creating inbound firewall rules.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
Evidence references

Evidence · 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.

observation · 1
Key points
  • Inbound traffic is blocked by default.
  • Limit rules by remote address scope.
  • Apply rules to the right profile.
Key checks
  • Get-NetFirewallProfile — profiles, enabled, default actions, logging
  • Get-NetFirewallRule -Enabled True -Direction Inbound — enabled inbound rules
  • Get-NetFirewallRule -DisplayName '<name>' | Get-NetFirewallPortFilter — ports of a rule
  • netsh 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docWindows networking and network services current

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%
Confirmation

Confirm action

Continue?