Summary
It's not obvious right now how to launch a sandbox without any network access.
It seems the easiest workaround would be --allow-host with a non-existing host... but that looks a bit ugly.
Why
Some usages do not, or should not, have (external) network access at all.
Eg. running a command in a sandbox and getting results via stdout.
How (optional)
Perhaps --deny-net option in the CLI, DenyNetwork: bool in SDK's Config objects.
Not sure if it's doable or sensible to not have eth0 at all inside the VM (just lo) ?
If not possible due to host<->agent comm, perhaps eth0 could be limited to the guest-agent cgroup in this case?
Regardless if keeping eth0 in sandbox is necessary or makes sense, the option would completely disable network egress.
Summary
It's not obvious right now how to launch a sandbox without any network access.
It seems the easiest workaround would be
--allow-hostwith a non-existing host... but that looks a bit ugly.Why
Some usages do not, or should not, have (external) network access at all.
Eg. running a command in a sandbox and getting results via stdout.
How (optional)
Perhaps
--deny-netoption in the CLI,DenyNetwork: boolin SDK's Config objects.Not sure if it's doable or sensible to not have
eth0at all inside the VM (justlo) ?If not possible due to host<->agent comm, perhaps
eth0could be limited to the guest-agent cgroup in this case?Regardless if keeping
eth0in sandbox is necessary or makes sense, the option would completely disable network egress.