19-04-2021



The firewall on the Mac will block or allow only TCP/IP traffic — not AppleTalk — so AppleTalk traffic (which is always from your local network and not the Internet anyway) is always able to get in. When enabled, the firewall blocks all traffic that comes into your Mac. This article is meant to help you configure your Mac OS X to be able to track all your network traffic using MITMProxy. This is a free and open source alternative to Fiddler, Charles, and other network tracing alternatives for Linux/mac OS X systems.

Traffic

Why block outgoing connections on Mac

People may wish to block outgoing connections for a variety of reasons, with the main one being privacy most of the times. If you’re reading this post, chances are you already tried to block outgoing connections on Mac. While OS X doesn’t have a feature that allows you to do so, blocking outgoing connections in OS X is easier than you may think.

Cost

Built-in incoming connections blocking

MacTraffic lights mac os x

While you can prevent some applications, programs or services to accept incoming connections by configuring OS X built-in Firewall (Apple Menu => System Preferences => Firewall tab =>Firewall Options => Choose “Block incoming connections”, see the Figure below), to configure outgoing traffic preferences and block outgoing connections on Mac you need to download a third-party application.

How incoming connections preferences can be edited in OS X

How to block outgoing connections on Mac

Edit: when this tutorial was originally written, TCPBlock was still being updated. After OS X 10.11 (El Capitan), TCPBlock doesn’t work correctly on Mac anymore. If you are running OS X El Capitan or a more recent version of OS X like Sierra, then make sure you check out this updated tutorial. Users running OS X 10.09 (Yosemite) may also encounter some problems (even though it’s rare): in that case we recommend that you read the updated guide.

Traffic Light Mac Os

TCPBlock is a lightweight application that allows you to do exactly that, and you can download it from this link. Once you have gone through the download process, you just need to install it. In order to do this, open the package and follow the instructions. Then make sure you restart the machine you’re working with. You’re now ready to block you’re undesired outgoing connections.

Using TCPBlock is very easy, just follow these steps:

Traffic Generator Mac Os X

Traffic
  1. First of all open the Apple Menu (Apple symbol on the upper left) and select System Preferences.
  2. Now click on the fresh new TCPBlock icon (it should be at the bottom of the window).
  3. If you see a closed lock at the bottom, just click on it and authenticate by prompting your password. If not, just skip this step.
  4. Finally, after you made sure you have the boxes checked as below, you just need to click on the + button, click on Select Application and add the application you wish to block the outgoing connections of.
  5. If you are having trouble finding an application, remember that you should find it under the “Application” tab you see on the left pane.

Traffic Shaping Mac Os X

That’s it! You can now control all of the outgoing connections on your Mac. In addition you can even block all of the outgoing connections by checking the “Block all outgoing” box on the left if you wish to, just remember that this way you won’t be able to complete the majority of the tasks that require a connection to the internet.

Network Traffic Analyzer For Mac Os

Edit: unfortunately TCPBlock was discontinued. You can still download it, but it is now outdated. If you want to check out the updated tutorials we have on this topic, feel free to follow this link for a 2020 update, or this link for a tutorial focused on Little Snitch.

Traffic Generator For Mac Os

For any doubt you may have, don’t hesitate to ask in the comments section below. If you found this tutorial helpful, please share 🙂 .