How can I block internet access to a specific application in Mac OS X? I need this to be done from the command line and hopefully use the ipfw terminal command.
Specifically I am looking to toggle the internet connection on and off in the iPhone simulator application since there is no airplane mode.
Best Answer
You can use the Lulu open-source macOS firewall that aims to block unknown outgoing connections, unless explicitly approved by the user. Whilst it has a GUI, the set of blocked applications can be controlled via the command line by modifying the config file
/Library/Objective-See/LuLu/rules.plist
as explained in the Lulu webpage (near the bottom).