Pcornel
Browse topics
Options
Recent
Favorites
Windows · Technical reference

Connection Security Rules

Direct answer

Connection security rules in Windows Firewall use IPsec to authenticate and optionally encrypt traffic between computers, such as requiring Kerberos-authenticated connections to servers or domain isolation.

When to use this

Use this when IPsec rules protect traffic between computers.

First 30 seconds

1. Get-NetIPsecRule.

2. Main mode/quick mode SAs: Get-NetIPsecMainModeSA, Get-NetIPsecQuickModeSA.

3. Authentication method matches on both sides.

4. Firewall rules requiring secure connections.

5. Test.

Operational verification

connection security rule → IPsec negotiation → protected traffic

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Requiring IPsec before all peers support it, breaking connectivity.
  • Certificates for authentication missing on some hosts.
  • Exempting too much traffic, so the rule protects little.
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-NetIPsecRule
Scope / prerequisiteUse this when IPsec rules protect traffic between computers.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Checks Verify boundary
Get-NetIPsecRule
Get-NetIPsecMainModeSA
Get-NetIPsecQuickModeSA

Security associations appear after traffic matches a rule. Failures are logged in the Security log (events 4650–4654, 4976–4984) when IPsec auditing is enabled.

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
  • Connection security rules use IPsec to authenticate or encrypt.
  • Domain isolation requires authenticated connections.
  • Both sides need matching rules.
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
ReferenceWhy it matters1 section · depth on demand

Using IPsec rules

Connection security rules require authentication (Kerberos, certificates) and optionally encryption between hosts — for example "only domain computers may connect to the database server". Monitor with Get-NetIPsecMainModeSA / Get-NetIPsecQuickModeSA and the *Monitoring → Security Associations* view in wf.msc. Start with "request authentication" before "require" to avoid outages.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Connection Security Rules configure IPsec: authenticate (and optionally encrypt) traffic between hosts, e.g. require Kerberos-authenticated IPsec for management ports so only domain machines can connect (domain isolation).

New-NetIPsecRule -DisplayName 'Require auth to servers' -InboundSecurity Require -OutboundSecurity Request -RemoteAddress 10.0.20.0/24 -Phase1AuthSet (Get-NetIPsecPhase1AuthSet -DisplayName 'ComputerKerberos').Name
Get-NetIPsecMainModeSA; Get-NetIPsecQuickModeSA

Combine with firewall rules using "Allow the connection if it is secure" and authorised computers/users.

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 → Connection Security 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?