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.

  • If you want something cheaper and and simpler than Little Snitch, take a look at Radio Silence: radiosilenceapp.com. Still not command line based, though. :( Apr 10, 2019 at 16:18

3 Answers 3


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).


I don't have a command line solution to do so, but there is an application that can successfully do exactly what you want.

Little Snitch is an application that has the ability to block certain processes and monitor connections. You could use this to block the iPhone simulator process from any network connectivity which would achieve the same effects as airplane mode, minus the native airplane mode features such as "You must turn on Airplane mode to use this feature", but so will a terminal command.

Hope this helps a little and good luck with developing your app! :)

  • 1
    I have definitely seen the Little Snitch tool before, but don't think it has a command line solution. If a UI solution suited my needs I could just use the Xcode provided Network Link Conditioner. Apr 17, 2014 at 1:00
  • Little snitch doesn't have a command line tool. I personally don't see the difference between using a command line or not where both can achieve the same result. But whatever floats your boat I guess :) Apr 17, 2014 at 1:32

You could also block incoming connections to an application by using the firewall. follow the instructions given below:


You must log in to answer this question.

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