Firewall to block all internet traffic except for domains I allow? #719
Replies: 3 comments 1 reply
-
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.
-
|
I've been working on this same use case, sandboxing Claude Code with a network allowlist. The dual-homed proxy approach from #1170 works well for filtering internet access (agent on The one gap I've hit is that the host gateway (e.g. I would love a way to enforce this at the vmnet/hypervisor level, ideally through a network mode with no host presence, or alternatively with host-side traffic filtering for vmnet interfaces. |
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