Skip to content

Instantly share code, notes, and snippets.

@sjmf
Created June 7, 2025 13:23
Show Gist options
  • Select an option

  • Save sjmf/449fb02b5a00e89d8efc000f26e42376 to your computer and use it in GitHub Desktop.

Select an option

Save sjmf/449fb02b5a00e89d8efc000f26e42376 to your computer and use it in GitHub Desktop.
Allow inbound traffic to WSL2 VM running in mirrored mode
[wsl2]
networkingMode=mirrored
[experimental]
hostAddressLoopback=true
# Allow inbound traffic to WSL2 VM running in mirrored mode
# https://learn.microsoft.com/en-us/windows/wsl/networking#mirrored-mode-networking
#
Get-NetFirewallHyperVVMCreator
Set-NetFirewallHyperVVMSetting -Name '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' -DefaultInboundAction Allow
Get-NetFirewallHyperVVMSetting -PolicyStore ActiveStore -Name '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment