Answer: To configure Claude Code with WSL2 in a JetBrains IDE, either allow WSL2 traffic through Windows Firewall (the recommended fix) or switch WSL2 to mirrored networking. For the firewall method, find your WSL2 IP with `hostname -I`, create a firewall rule in PowerShell matching your subnet, then restart your IDE and Claude Code. Status: Confirmed Entry: tool/claude-code/troubleshooting/wsl-configuration Revision: 2 Digest: sha256:f7d08656877098b4 (changes whenever the content changes) Timeline: Created: 2026-11-13T02:31:19Z Last changed: 2026-11-13T12:11:10Z (restart command: — → wsl --shutdown) Last verified: 2026-11-20T12:21:32Z Next check: 2026-11-21T12:21:32Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of recommended fix | Allow WSL2 traffic through Windows Firewall | [1] | 2026-11-20 IP command | hostname -I | [1] | 2026-11-20 subnet example | 172.21.0.0/16 | [1] | 2026-11-20 firewall rule name | Allow WSL2 Internal Traffic | [1] | 2026-11-20 mirrored networking requirement | Windows 11 22H2 or later | [1] | 2026-11-20 wslconfig setting | networkingMode=mirrored | [1] | 2026-11-20 restart command | wsl --shutdown | [1] | 2026-11-20 Sources: [1] Anthropic. "JetBrains IDEs". https://code.claude.com/docs/en/jetbrains.md Role: primary. Accessed: 2026-11-20T12:21:32Z Quote: "Allow WSL2 traffic through Windows Firewall This is the recommended fix because it keeps your existing WSL2 networking mode." (Supports: recommended fix) Quote: "hostname -I" (Supports: IP command) Quote: "if the address is `172.21.123.45`, your subnet is `172.21.0.0/16`" (Supports: subnet example) Quote: "New-NetFirewallRule -DisplayName "Allow WSL2 Internal Traffic" -Direction Inbound -Protocol TCP -Action Allow -RemoteAddress 172.21.0.0/16 -LocalAddress 172.21.0.0/16" (Supports: firewall rule name) Quote: "Mirrored networking requires Windows 11 22H2 or later." (Supports: mirrored networking requirement) Quote: "networkingMode=mirrored" (Supports: wslconfig setting) Quote: "Then restart WSL with `wsl --shutdown` from PowerShell." (Supports: restart command) Published: 2026-11-20T03:00:45Z Snapshot SHA-256: 488a0cba98c2e6dfcd168cbe39bff43c5e374e02b1889ec708a712ec38992a01 (captured 2026-11-13T02:28:00Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:04:27Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:21:32Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:21:32Z Last attempt: 2026-11-20T12:21:32Z Notes and limitations: Extracted automatically from a single official source (section "WSL configuration"). Related: https://latestn.com/tool/cline/account-and-plans/aws-marketplace-subscription-bedrock Do I need an AWS Marketplace subscription to use Bedrock models with Cline? https://latestn.com/tool/cline/account-and-plans/benefits-of-usage-billing What are the benefits of using Cline (usage-billing) instead of managing separate API keys? https://latestn.com/tool/cline/account-and-plans/create-api-key How do I create an API key for the Cline API? https://latestn.com/tool/claude-code/troubleshooting/validate-test-marketplace How do I validate and test a Claude Code plugin marketplace locally before hosting it? https://latestn.com/tool/claude-code/troubleshooting/verify-gateway-connection How do I verify that Claude Code is connected to the LLM gateway? https://latestn.com/tool/claude-code/troubleshooting/verify-plugin-installation How do I verify that a plugin is installed and its skills appear in Claude Code? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T12:11:10Z | changed | restart command: — → wsl --shutdown | [1] 2026-11-13T12:11:10Z | changed | wslconfig setting: — → networkingMode=mirrored | [1] 2026-11-13T12:11:10Z | changed | mirrored networking requirement: — → Windows 11 22H2 or later | [1] 2026-11-13T12:11:10Z | changed | firewall rule name: — → Allow WSL2 Internal Traffic | [1] 2026-11-13T12:11:10Z | changed | subnet example: — → 172.21.0.0/16 | [1] 2026-11-13T12:11:10Z | changed | recommended fix: — → Allow WSL2 traffic through Windows Firewall | [1] 2026-11-13T12:11:10Z | changed | WSL restart command: wsl --shutdown → — | [1] 2026-11-13T12:11:10Z | changed | Mirrored networking config: networkingMode=mirrored → — | [1] 2026-11-13T12:11:10Z | changed | Mirrored networking requirement: Windows 11 22H2 or later → — | [1] 2026-11-13T12:11:10Z | changed | Firewall rule name: Allow WSL2 Internal Traffic → — | [1] 2026-11-13T12:11:10Z | changed | Example subnet: 172.21.0.0/16 → — | [1] 2026-11-13T12:11:10Z | changed | Subnet format: .0.0/16 → — | [1] 2026-11-13T12:11:10Z | changed | Recommended fix: Allow WSL2 traffic through Windows Firewall → — | [1] 2026-11-13T02:31:19Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/troubleshooting/wsl-configuration/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/troubleshooting/wsl-configuration POST: https://latestn.com/dispute/tool/claude-code/troubleshooting/wsl-configuration with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/troubleshooting/wsl-configuration?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure Claude Code to work with WSL in a JetBrains IDE? Revision 2, last verified 2026-11-20T12:21:32Z. https://latestn.com/tool/claude-code/troubleshooting/wsl-configuration (accessed 2026-11-21T10:00:32Z). @misc{LatestN_tool_claude_code_troubleshooting_wsl_configuration_r2, title = {How do I configure Claude Code to work with WSL in a JetBrains IDE?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/troubleshooting/wsl-configuration}}, note = {Revision 2; digest sha256:f7d08656877098b4; last verified 2026-11-20T12:21:32Z; accessed 2026-11-21T10:00:32Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/troubleshooting/wsl-configuration