I'm dealing with a strict corporate MacBook running Ventura/Sonoma, and I'm trying to figure out which part of the macOS security stack is causing socket-level errors for all my non-browser traffic. Here's the situation: while browsers like Chrome and Safari function without issue, any command I try to run in the terminal—be it curl, ping, ssh, or even running a Python script—results in an error: socket.error: [Errno 1] Operation not permitted.
I've also run some diagnostics and found that when I ping a well-known IP or try to fetch a URL with curl, the commands either fail or can't resolve get a host. I've tested this even off the corporate VPN using my mobile hotspot, and the issue persists.
Is it possible that a Socket Filter or Content Filter (like Zscaler or Cisco AnyConnect) is causing this? Could macOS's TCC be restricting access specifically for terminal apps? Or might there be a configuration in the MDM profile affecting network access? I lack sudo rights to make deeper inspections, but I want to provide specific details when I raise a ticket with IT. Any insights?
3 Answers
This sounds like a permissions issue to me. When you first use the terminal, it might not have permission to access the network. Many users miss the prompts asking for access. This could definitely be what's causing the terminal commands to fail while browsers work fine.
Sounds like your IT security team decided to limit network access for terminal apps but forgot to extend that access to the tools developers actually use. It's typical for something like a socket filter to be configured to only allow specific apps while blocking everything else. Try checking your network settings and see if anything is flagged as a content filter.
You might be right! I looked into it and logistic restrictions match your description. What do you think would be the best way to phrase a request to IT for them to allow access for terminal apps like com.apple.terminal without just saying the internet is broken?
That's a good question! Before diving into solutions, I'm curious about your use of git. When you try to pull from a remote repository, does it work? I’m thinking if everything is blocked, that might show something different.
I just did a git pull and got an error saying it couldn’t resolve the host for GitHub. It seems anything I run in the terminal is blocked, while apps like Chrome and VS Code's updater can still connect.

Spot on! I've seen this happen before. macOS uses sandboxing, and when it blocks network access to terminal apps, it can throw errors that look like permission issues.
Also, if your IT has some kind of monitoring software, it might be interfering with terminal commands too, creating what resembles a permissions issue.