Firewall to block all internet traffic except for domains I allow? #719
Replies: 2 comments
-
I really wish there was some feedback on this, as I am also looking to solve the same issue for myself. |
Beta Was this translation helpful? Give feedback.
-
|
Have you just tried setting up a container with firewall rules? You might run into issues, but Docker has |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm interested in using apple containers as an isolated environment for running AI agents, such as Claude Code and OpenAI Codex CLI. The idea is to block most internet traffic, but to allow traffic to e.g. claude.ai servers, or openai servers, but nothing else.
Anthropic has a reference implementation of a container that sets up firewall rules to accomplish this, but they note that it requires
--cap-add=NET_ADMINand--cap-add=NET_RAWpassed to docker run. Butcontainer rundoesn't have these options.I wonder if it's possible to accomplish this goal in a different way? Perhaps since in Apple containers each container gets its own IP address, there's a way to use that on the macOS side?
Any help would be most appreciated?
Beta Was this translation helpful? Give feedback.
All reactions