1

I want to run an application on macOS, but preventing it from making any type of network access, or any type of internet access.

I have seen the following possibilities:

  • Use the built-in firewall. Unfortunately, this blocks only inbound connections, not outbound.

  • I have seen Little Snitch. However, it feels uncomfortable from a security standpoint to install a closed-source software on my system that has so deep an access to everything I do.

Ideally, I would like to do that myself. Is it possible to restrict an app's access to network ressources on macOS ? Maybe start it in a sandbox mode somehow?

Thanks!

1 Answer 1

2

You can use sandbox-exec

Usage: sandbox-exec -n no-network someProgram

2
  • sandbox-exec has been deprecated. Do you know what the replacement is ?
    – DevShark
    Commented Dec 15, 2019 at 14:26
  • 1
    As far as I'm concerned, there is no replacement for a single command. If you are developing your own application, you can use sandbox_init(3) though.
    – L00P3R
    Commented Dec 15, 2019 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .