Workaround for Activating Content Filter via CLI with GUI App on macOS

Hi all,

I would like to know if it is possible to activate a content filter through the command line interface (CLI). Based on my research, it seems that Apple does not allow this for security design reasons. If it’s indeed not permitted, is there a way to use a GUI-based app as a workaround, where the GUI would only serve the purpose of activating the content filter? After the filter is activated, I’d like to hide the GUI app and run the content filter in the background. Is this approach feasible, and what would be the best way to achieve it?

Thanks in advance for your help!

Answered by DTS Engineer in 805324022
I’d like to hide the GUI app and run the content filter in the background.

A macOS content filter is packaged as a system extension. That runs independently of the container app. Once the container app has configured the content filter, it doesn’t need to be running.

As to your main question, why are you trying to automate this? Most folks who ask questions like this are targeting a managed environment, and MDM has mechanisms to automatically configure the filter.

OTOH, if you’re trying to do this on an unmanaged machine, you shouldn’t be automating it. If you’re going to monitor the user’s traffic, they should be in aware of that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I’d like to hide the GUI app and run the content filter in the background.

A macOS content filter is packaged as a system extension. That runs independently of the container app. Once the container app has configured the content filter, it doesn’t need to be running.

As to your main question, why are you trying to automate this? Most folks who ask questions like this are targeting a managed environment, and MDM has mechanisms to automatically configure the filter.

OTOH, if you’re trying to do this on an unmanaged machine, you shouldn’t be automating it. If you’re going to monitor the user’s traffic, they should be in aware of that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Workaround for Activating Content Filter via CLI with GUI App on macOS
 
 
Q