sodcalculator

08 Everyday Math

Firewall Settings for Mac: A Complete Guide

Guide 08-64688 · Updated · Step by step

To turn on the Mac firewall, go to System Settings > Network > Firewall and toggle it on. From there you can add exceptions for specific apps, enable stealth mode, and block all incoming connections.

What the Mac Firewall Actually Does

The macOS firewall is a built-in application layer firewall that filters incoming network connections. It is not a full network firewall like those found in enterprise routers; instead, it controls which apps and services on your Mac are allowed to accept incoming connections from the network or the internet.

When the firewall is on, it examines each incoming connection and decides whether to allow or block it based on the rules you have set. Outgoing connections are generally not filtered, meaning your Mac can still send data out freely. This is different from many third-party firewalls that monitor both directions.

By default, the firewall is off on most Macs. Apple intentionally leaves it off because the typical home user behind a router is already protected by the router’s network address translation (NAT), which hides the Mac from unsolicited incoming traffic. However, turning the firewall on adds a layer of defense, especially when using public Wi-Fi or when your Mac is directly connected to the internet without a router.

How to Turn On the Firewall

Here are the step-by-step instructions for enabling the firewall on a modern Mac running macOS Ventura or later:

  1. Open System Settings (click the Apple menu and select System Settings).
  2. Click Network in the sidebar.
  3. Click Firewall on the right side.
  4. Toggle the switch to On.

On older macOS versions (Monterey and earlier), the path is: System Preferences > Security & Privacy > Firewall tab, then click the lock to make changes and click Turn On Firewall.

Once enabled, you can click Options to configure additional settings.

Firewall Options Explained

The Options button reveals several settings that let you fine-tune the firewall’s behavior:

  • Block all incoming connections: This is the strictest setting. It blocks all incoming connections except those required for basic internet services like DHCP and Bonjour. It effectively makes your Mac invisible to other devices, but it can break features like file sharing, screen sharing, and some multiplayer games.
  • Automatically allow built-in software to receive incoming connections: This is enabled by default. It lets Apple’s own apps (like Safari, Messages, and FaceTime) accept connections without asking you. It’s generally safe to leave on.
  • Automatically allow downloaded signed software to receive incoming connections: This allows apps that are signed by a recognized certificate authority (like apps from the Mac App Store) to accept connections automatically. If you turn this off, you’ll be prompted each time a new app tries to accept incoming connections.
  • Enable stealth mode: When enabled, your Mac does not respond to ping requests or port scans. This makes it harder for attackers to discover your Mac on a network, but it can also make network troubleshooting more difficult.

Adding App Exceptions

If you have an app that needs to accept incoming connections (for example, a game server, a remote desktop app, or a development tool), you can add it to the firewall’s allowed list:

  1. In the Firewall settings, click Options.
  2. Click the + button under the list of allowed apps.
  3. Navigate to the app in your Applications folder (or wherever it’s installed) and select it.
  4. Click Add.

The app will then be allowed to accept incoming connections. You can also select an app and click the minus button to remove it, which will cause the firewall to block its incoming connections (unless it’s a built-in or signed app that’s allowed automatically).

When you first launch an app that wants to accept incoming connections, macOS may show a dialog asking if you want to allow it. This is the firewall working—you can choose Allow or Don’t Allow.

Common Problems and Troubleshooting

Turning on the firewall can sometimes cause issues. Here are a few common ones and how to fix them:

  • File sharing stops working: If you use File Sharing, Screen Sharing, or Remote Login, you need to ensure those services are allowed through the firewall. They appear in the allowed apps list automatically when you turn on the firewall, but if you’ve blocked all incoming connections, you’ll need to disable that option or add the specific services.
  • Apps can’t connect to your Mac: If an app worked before you turned on the firewall but now fails, check if the app is in the allowed list. If not, add it manually. Also check if the app is signed—if it’s not, you may need to allow it explicitly.
  • Stealth mode causes network issues: Some network diagnostic tools rely on responding to pings. If you enable stealth mode and then have trouble with a printer or other device, try turning it off.
  • Firewall toggle is grayed out: This can happen if your Mac is managed by an organization (e.g., a school or company). You’ll need to contact your IT administrator to change the setting.

Firewall vs. Third-Party Firewalls

The built-in Mac firewall is sufficient for most users. However, some people prefer third-party firewalls like Little Snitch or LuLu, which offer more granular control, including monitoring outgoing connections.

Outgoing monitoring can be useful if you want to see which apps are sending data from your Mac, which can help detect malware or privacy leaks. However, it can also be annoying because you’ll get frequent prompts asking to allow or deny outgoing connections.

If you choose to install a third-party firewall, it’s generally recommended to turn off the built-in one to avoid conflicts. Running two firewalls at the same time can cause network issues and performance degradation.

For most people, the built-in firewall is enough. It’s free, integrated, and doesn’t require any configuration beyond turning it on.

Frequently Asked Questions

Is the Mac firewall on by default?

No, the firewall is off by default on most Macs. Apple assumes you’re behind a router, which provides NAT protection. You should turn it on if you use public Wi-Fi often or if you want an extra layer of security.

Does the firewall slow down my Mac?

No, the firewall has a negligible impact on performance. It only inspects incoming connections, which is a lightweight process. You won’t notice any slowdown in everyday use.

Should I turn on stealth mode?

Stealth mode is a good idea if you’re on a public network and want to avoid being scanned. However, it can interfere with network troubleshooting and some peer-to-peer apps. If you don’t need those, enabling it is a good security practice.

Why is my firewall not blocking an app?

If an app is still able to accept connections even after you’ve blocked it, it might be a built-in Apple app or a signed app that’s automatically allowed. Check the firewall options to see if “Automatically allow built-in software” or “Automatically allow downloaded signed software” is enabled. You can turn those off to force prompts for all apps.

Can I use the firewall to block outgoing connections?

No, the built-in Mac firewall only controls incoming connections. To block outgoing connections, you’ll need a third-party firewall like Little Snitch or LuLu.

What’s the difference between the firewall and VPN?

The firewall controls what network traffic is allowed in and out of your Mac. A VPN encrypts all your internet traffic and routes it through a remote server, hiding your IP address. They serve different purposes—firewall for security, VPN for privacy and bypassing geo-restrictions—and can be used together.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Everyday Math bed →