[BUG] Desktop app blocks all LAN/private IP network access (regression)

Resolved 💬 3 comments Opened Apr 11, 2026 by alexchax Closed Apr 14, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The Claude Code desktop app (Electron) blocks all outbound TCP connections to LAN/private IP ranges (192.168.x.x). SSH, ping, and nc to any local network device all fail with "No route to host". This is a regression — local SSH to a Mac Studio on the same subnet worked as recently as March 26, 2026.

The same SSH command works perfectly from a regular Terminal on the same machine. Only the desktop app's Bash tool is affected.

Key findings from debugging:

  • Both machines are on the same subnet (192.168.0.x), ARP resolves correctly
  • The Mac Studio can ping/reach the MacBook — but not the reverse (from Claude Code)
  • dangerouslyDisableSandbox: true on the Bash tool does NOT help
  • Adding "excludedCommands": ["ssh *"] to sandbox settings in settings.json does NOT help
  • Tailscale IPs (100.x.x.x) continue to work fine
  • Disabling Tailscale entirely does NOT fix it — confirming it's the Electron app's network restriction
  • The restriction applies to ALL LAN devices (tested multiple IPs), not just one host

What Should Happen?

The Bash tool should be able to reach LAN/private IP addresses, just as it could prior to ~March 26, 2026. SSH to machines on the local network is a core workflow for users who develop on remote local servers.

Error Messages/Logs

$ ssh -o ConnectTimeout=5 alexchachkov@192.168.0.27 "echo hello"
ssh: connect to host 192.168.0.27 port 22: No route to host

$ ping -c 1 192.168.0.27
ping: sendto: No route to host
PING 192.168.0.27 (192.168.0.27): 56 data bytes
--- 192.168.0.27 ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss

$ ping -c 1 192.168.0.1  # gateway WORKS from sandbox
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=7.309 ms

Steps to Reproduce

  1. Open Claude Code desktop app (Electron) on a Mac connected to a local network
  2. Have another machine on the same subnet (e.g., 192.168.0.27) with SSH enabled
  3. Run: ssh -o ConnectTimeout=5 user@192.168.0.27 "echo hello"
  4. Observe: "No route to host" error
  5. Open a regular Terminal on the same Mac
  6. Run the exact same command
  7. Observe: SSH connects successfully

Also tested:

  • ping 192.168.0.27 from Claude Code Bash tool -> "No route to host"
  • nc -z -w 3 192.168.0.27 22 from Claude Code Bash tool -> fails
  • ping 192.168.0.1 (router/gateway) from Claude Code Bash tool -> WORKS
  • All of the above work from regular Terminal

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

1.1617.0 (desktop app)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

  • Claude Code version: 1.1617.0 (desktop app / Electron)
  • OS: macOS Darwin 25.3.0 (Sequoia)
  • Machine: MacBook Pro, connected via Wi-Fi to 192.168.0.x subnet
  • Target: Mac Studio on same subnet at 192.168.0.27 (SSH works from regular Terminal)
  • Last working: March 26, 2026 (confirmed via last login history on the target machine showing successful SSH sessions from this MacBook's IP via Claude Code)
  • Note: dangerouslyDisableSandbox: true and sandbox excludedCommands settings have no effect, suggesting the restriction is at the Electron app process level, not the Bash tool sandbox level.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗