[BUG] Desktop app blocks all LAN/private IP network access (regression)
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: trueon 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
- Open Claude Code desktop app (Electron) on a Mac connected to a local network
- Have another machine on the same subnet (e.g., 192.168.0.27) with SSH enabled
- Run:
ssh -o ConnectTimeout=5 user@192.168.0.27 "echo hello" - Observe: "No route to host" error
- Open a regular Terminal on the same Mac
- Run the exact same command
- Observe: SSH connects successfully
Also tested:
ping 192.168.0.27from Claude Code Bash tool -> "No route to host"nc -z -w 3 192.168.0.27 22from Claude Code Bash tool -> failsping 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
lastlogin history on the target machine showing successful SSH sessions from this MacBook's IP via Claude Code) - Note:
dangerouslyDisableSandbox: trueand sandboxexcludedCommandssettings have no effect, suggesting the restriction is at the Electron app process level, not the Bash tool sandbox level.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗