I want to be able to disconnect all available interfaces on a device running macOS 11 and above.
For Wi-Fi interfaces I see that this is possible using the CoreWLAN framework. https://developer.apple.com/documentation/corewlan/cwinterface/1426422-disassociate
However, how can I do something similar for an ethernet interface? I want to be able to reconnect the interface eventually as well.
The reason I want to be able to do this is that I want to drop all existing connections on the device right after I start my content filter or when my filter rules have changed and my filter has already allowed the flow perviously.