keepcalculator

06 Numbers and Powers

Mac Firewall: What Turning It On Actually Does

Card No. 06·43885 · Updated · Standard formula, shown below

Turning on the macOS firewall enables a built-in, application-level filter that monitors incoming network connections and blocks them unless the specific app has been granted permission. It does not scan outgoing traffic or act as an antivirus, and it is off by default on most Macs. Here is what it really does, how to configure it, and why you might—or might not—need it.

Background: Why macOS Has a Firewall at All

macOS has included a firewall since OS X 10.5 Leopard, replacing the earlier, more technical ipfw tool. The modern version is a host-based firewall, meaning it runs on your Mac itself rather than on a separate device like a router. Its job is to filter traffic arriving at your Mac from other computers, services, or devices on your network or the internet.

By default, the firewall is turned off. Apple’s reasoning is that most Macs sit behind a router, which already provides network address translation (NAT) and a basic packet filter that blocks unsolicited inbound traffic. The macOS firewall adds a second layer of defense, but it is not enabled out of the box to avoid breaking services like file sharing, screen sharing, or AirDrop that rely on incoming connections.

How the macOS Firewall Works

Unlike a traditional network firewall that filters by IP address and port, the macOS firewall is application-based. It inspects incoming connection requests and decides whether to allow them based on the app that is trying to receive the connection. When the firewall is on, it uses a signed certificate and a hidden identifier to recognize apps, so it can maintain rules even if the app is updated.

When an app that has not been approved tries to accept an incoming connection, macOS shows a warning dialog asking whether to allow or block it. If you click “Allow,� the app is added to the allowed list. If you click “Block,� it is added to the blocked list. You can manage these lists manually in System Settings (or System Preferences on older macOS) under Network → Firewall → Options.

The firewall also has three additional options:

  • Block all incoming connections: This denies every inbound connection except those required for basic network services like DHCP and DNS. It effectively makes your Mac invisible to most network probes.
  • Automatically allow built-in software: Apple’s own apps (like Safari, Mail, and Messages) are allowed to receive connections without asking.
  • Enable stealth mode: This makes your Mac ignore unsolicited probe requests (like ping) and not respond to connection attempts on closed ports, making it harder for someone to discover that your Mac exists on the network.

What the Firewall Does NOT Do

It is important to understand the limits. The macOS firewall only filters incoming traffic. It does not monitor or block outgoing connections. That means if malware is already running on your Mac and tries to phone home, the firewall will not stop it. You would need a third-party application firewall or a network-level solution for that.

It also does not scan files for viruses, block malicious websites, or filter content. Those tasks belong to antivirus software and browser protections. The firewall is purely a network traffic filter, not a security suite.

How to Turn It On and Choose Settings

Turning on the firewall is straightforward:

  1. Open System Settings (macOS Ventura or later) or System Preferences (earlier versions).
  2. Click Network, then Firewall.
  3. If the firewall is off, click Turn On Firewall.
  4. Click Options to adjust the three settings described above.

For most users, the default options are fine: allow built-in software, and do not enable stealth mode unless you are on a public network and want to be less visible. Blocking all incoming connections can break legitimate features like AirDrop, Handoff, or sharing your screen, so only use it when you are on an untrusted network and do not need those features.

Common Problems and Misconceptions

A frequent misconception is that enabling the firewall will slow down your internet. In practice, the performance impact is negligible because the firewall only inspects connection setup, not the data flowing through established connections. You are unlikely to notice any speed difference.

Another issue is that the firewall may block a legitimate app that you want to allow. If a game or a developer tool cannot accept incoming connections, check the firewall options and add the app to the allowed list. If you see repeated popups asking about the same app, it may be because the app is updated frequently, and the firewall’s rule no longer matches the new version. Re-allow it and the popups should stop.

Some users think the firewall protects against malware. It does not. Malware that runs as a normal user process can still make outgoing connections, and the firewall will not stop it. For protection against malware, keep your system updated, use built-in protections like Gatekeeper and XProtect, and be cautious about what you download.

When You Should Turn It On

There is no hard rule, but the firewall is most useful when you are on a network you do not fully trust, such as public Wi-Fi in a coffee shop or hotel. On such networks, other devices may try to probe your Mac. The firewall, especially with stealth mode enabled, makes your Mac much less visible.

If you are at home behind a router with NAT, the firewall adds little extra protection because your router already blocks unsolicited inbound traffic. However, if you use services like file sharing or remote login, the firewall can act as an extra gatekeeper, letting you control which apps can accept connections.

Comparing the macOS Firewall to Third-Party Firewalls

Third-party firewalls, such as Little Snitch or LuLu, offer more granular control. They can monitor outgoing connections, show you real-time network activity, and let you create rules for individual IP addresses or domains. The built-in firewall cannot do any of that.

For the average user, the built-in firewall is sufficient. For a privacy-conscious user who wants to know exactly what apps are phoning home, a third-party tool is worth considering. However, third-party firewalls can be intrusive, requiring you to approve every new connection, and they may interfere with legitimate software if not configured carefully.

Frequently Asked Questions

Does the macOS firewall block incoming connections from the internet?

Yes, it blocks unsolicited incoming connections from any source, including the internet, unless the app is on the allowed list. However, if you have port forwarding set up on your router, the firewall will still block the connection at the Mac level unless the corresponding app is allowed.

Will turning on the firewall break AirDrop or Handoff?

It can. AirDrop and Handoff rely on incoming connections that the firewall may block if the relevant system services are not allowed. If you enable “Block all incoming connections,� those features will likely stop working. With the default settings, they usually work because Apple’s built-in software is automatically allowed.

Does the firewall protect against ransomware?

No. Ransomware typically spreads through files or exploits, not by making unsolicited incoming connections. The firewall cannot stop you from opening a malicious attachment or visiting a compromised website. Use antivirus software and keep your system updated for that kind of protection.

Why does my Mac ask to allow incoming connections for an app I do not recognize?

This can happen when a legitimate app (like a game or a development tool) tries to open a network port for the first time. It can also happen if an app has been updated and the firewall no longer recognizes it. If you did not install the app recently, it is safer to click “Block� and investigate the app in your Applications folder.

Can I turn on the firewall and still use screen sharing?

Yes, as long as you allow the Screen Sharing app (or the relevant system service) in the firewall options. If you use “Block all incoming connections,� you will need to turn it off or add an exception for the screen sharing service.

Does stealth mode make my Mac invisible to all network scanners?

No, stealth mode only prevents your Mac from responding to unsolicited probes like ping and TCP connection attempts on closed ports. A determined attacker can still find your Mac by other means, such as monitoring network traffic or using active scanning techniques. Stealth mode raises the bar but is not invisibility.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →