vm_egress
Narrow a virtual machine's network access.
Narrows what a machine may reach: mode allowlist lets out only what its rules allow, blocked nothing, and remove takes rules out. Only the person opens a machine or adds rules. With neither it says the machine's access: its mode, rules, whether its frames cross the OSMates filter, and what the filter allowed and refused. On a running Linux or macOS machine on NAT or a shared network, blocked takes the network off at once, and allowlist too until OSMates restarts the machine: vm_stop, then vm_start. ssh and forwards still reach it through its agent.
- Profiles
- operator, full
- Read-only
- No
- Destructive
- Yes
- Idempotent
- No
- Open world
- No
- Runs as a task
- No
Parameters
modestringNarrower than the machine's now.
One of
allowlist,blocked.removearray of stringsRules to take out, such as "example.com" or "tcp host:8080".
vmstringRequiredThe machine's name or identifier, as vm_list shows it.
Output
The result's structured content is an object with these fields.
JSON Schema: /schemas/0/mcp/tools/vm_egress/output.json
egressobjectRequiredegress.allowedintegerRequiredegress.appliedstringOne of
live,detached,detachedUntilRestart,atNextStart.egress.lastRefusalobjectegress.pathstringOne of
direct,filtered.egress.pathFollowsPolicybooleanRequiredegress.policyobjectRequiredegress.refusedintegerRequiredegress.restartNeededbooleanRequiredegress.runstringOne of
direct,filtered,detached.egress.sharedNetworkstring
Fields nested deeper are in the schema.