- Docs
- English EN-US
- English
- 简体中文
- 繁體中文
- 日本語
- 한국어
- العربية
- العربية
- Deutsch
- Español
- Français
- हिंदी
- Bahasa Indonesia
- Italiano
- Nederlands
- Polski
- Português
- Русский
- Türkçe
Current version status:
Feature | bridge mode (deprecated) | mirrored mode (recommended) |
---|---|---|
Protocol architecture | Dual-stack | Shared stack |
IP address allocation | Independent IP (Windows + WSL) | Shared host IP |
Port resources | Separate | Shared ports (conflict-avoidance required) |
Network performance | Relatively heavy | Lightweight & efficient |
Configuration complexity | Simple | Requires deep firewall policy setup |
Configure the base mode via WSL Settings app:
Run the complete policy configuration via PowerShell:
# Define the WSL VM GUID
$wslGuid = '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}'
# Configure firewall policies (execute in order)
Set-NetFirewallHyperVVMSetting -Name $wslGuid -Enabled True
Set-NetFirewallHyperVVMSetting -Name $wslGuid -DefaultInboundAction Allow
Set-NetFirewallHyperVVMSetting -Name $wslGuid -DefaultOutboundAction Allow
Set-NetFirewallHyperVVMSetting -Name $wslGuid -LoopbackEnabled True
Set-NetFirewallHyperVVMSetting -Name $wslGuid -AllowHostPolicyMerge True
# Verify configuration results
Get-NetFirewallHyperVVMSetting -Name $wslGuid
# Example: Check port 80 usage
Get-NetTCPConnection -LocalPort 80
Get-NetFirewallHyperVVMSetting
should be True/Allownetstat -ano
to view port usagehttp://localhost:<port>
http://<host-ip>:<port>