Guide

Mac firewall: how to turn it on, what it blocks, and which settings to choose

The short answer

Every Mac has a firewall built in, and it is worth turning on. Open System Settings, click Network, then Firewall, and switch it on. It blocks unwanted connections that other computers start towards your Mac, which matters most on public Wi-Fi. The default options are sensible: Apple-signed and properly signed apps are allowed automatically. Turn on stealth mode if you want your Mac to stop answering pings. Know the limit: the macOS firewall controls incoming connections only. It does not stop an app on your Mac from sending data out; for that you need a separate outbound firewall app.

4 min readUpdated 27 November 2026macOS 13 Ventura to macOS 26 Tahoe (older versions: Security and Privacy, Firewall)

Where it is
System Settings, Network, Firewall (macOS Ventura and later).
What it blocks
Unwanted incoming connections started by other computers.
What it does not block
Apps on your Mac connecting out to the internet.
Best everyday setting
Firewall on, signed software allowed automatically, stealth mode on for public networks.
Strictest setting
Block all incoming connections. Breaks file sharing, screen sharing and AirPlay to the Mac.
Still open when on
Ports for sharing services you turned on, such as File Sharing or Remote Login.
On this page5 sections
  1. How do I turn on the firewall on a Mac?
  2. Which Mac firewall options should I choose?
  3. What does the macOS firewall actually protect against?
  4. Do I need an outbound firewall on a Mac?
  5. Questions

How do I turn on the firewall on a Mac?

Apple's steps are short. Choose Apple menu, System Settings, click Network in the sidebar, then click Firewall; you may need to scroll. Switch the firewall on. You will be asked for your password, because the firewall applies to every account on the Mac.

On macOS Monterey and earlier the same switch is in System Preferences, Security and Privacy, Firewall, behind the padlock.

Turning it on does not interrupt anything you are doing. Browsing, email, streaming, video calls and app updates all start from your Mac, so they are outgoing and keep working. What changes is that apps and services that wait for other computers to connect to them now need permission. The first time one of those starts listening, macOS asks whether to allow incoming connections for it, and your answer is remembered.

If the switch is greyed out, your Mac is probably managed by an employer or school, and the setting is controlled by their profile.

Which Mac firewall options should I choose?

Click Options next to the switch. Apple's own descriptions of each setting, in plain words:

  • Block all incoming connections. Blocks incoming connections to everything except basic services the Mac needs to find others on the network. Safest, but it also blocks File Sharing, Screen Sharing and AirPlay to this Mac. Good for a hotel or airport, annoying at home.
  • Automatically allow built-in software to receive incoming connections. Apple's own apps and services are allowed without asking. Leave it on.
  • Automatically allow downloaded signed software to receive incoming connections. Apps from developers with a valid signature are allowed without asking. Leaving it on means fewer prompts; turning it off means you approve each one yourself.
  • Enable stealth mode. Your Mac stops answering probing requests such as ping, which makes it harder to discover on a network. Apps you allowed still work. Worth turning on, especially on laptops.

Below the options is the list of apps allowed or blocked. You can add an app with the plus button or remove one with the minus button.

What does the macOS firewall actually protect against?

Apple describes the firewall as protection against "unwanted contact initiated by other computers". Picture a café network: anyone on it can try to reach the devices around them. If a service on your Mac is listening, such as a sharing feature you forgot about or a developer server, the firewall decides whether strangers can reach it.

It is one layer, and it is not the main one. Most attacks on Mac users today arrive as something you download or open, which then runs as you and connects out. The macOS firewall does not look at outgoing traffic at all. Apple's defences for that case are Gatekeeper, notarization and XProtect, which run on every Mac; XProtectService is the one you may spot in Activity Monitor.

Some connections stay open even with the firewall on. Apple lists ports opened by sharing services such as File Sharing, apps you approved, and some system services. That is why it also matters which sharing features are switched on in System Settings, General, Sharing. Turn off any you do not use.

Do I need an outbound firewall on a Mac?

Most people do not. An outbound firewall asks before any app connects out, which is useful if you want to see and control everything that phones home, and noisy for everyone else, because almost every app talks to the internet. For a quieter middle ground, you can see which apps used the network, and how much they sent, without blocking anything: Activity Monitor's Network tab shows it, and our Mac network monitor guide explains how to read it.

The bigger wins for most Macs are simpler: firewall on, stealth mode on, unused sharing services off, FileVault on, macOS up to date. Those are the same things a security checkup looks at.

Questions people ask

Should the firewall be on or off on a Mac?

On. It costs nothing in everyday use, it only asks about apps that wait for incoming connections, and it protects you on shared networks.

Does the Mac firewall block outgoing connections?

No. The built-in firewall only controls connections started by other computers. Blocking apps from connecting out needs a separate outbound firewall app.

What is stealth mode on a Mac?

A firewall option that stops your Mac answering probing requests such as ping, so it is harder to discover on a network. Apps you have allowed still work normally.

Why is the firewall greyed out on my Mac?

Usually because an employer or school manages the Mac with a configuration profile that controls the firewall. Check System Settings, General, Device Management.

Will turning on the firewall slow my Mac or my internet?

No noticeable difference. It does not inspect your browsing or downloads, which are outgoing.

Sources and further reading