Get the free coreGet core

Mac firewall: on or off, and what it actually blocks

Updated 5 min readSection 06 / Mac security
SHORT ANSWER

The Mac firewall is built in, and the first move is to check its switch. Choose Apple menu > System Settings, click Network in the sidebar, then click Firewall. If it is off, switch it on. It protects your Mac from unwanted contact started by other computers on the internet or a network. Then click Options and turn on "Enable stealth mode" if you want your Mac to stay quiet to probing requests.

01Where to check and turn it on

Whether it is already on is not something to guess. Look at the switch on every Mac you use, once. If the switch is already on, the basic step is done, and Options and stealth mode are extras you can add.

  1. Choose Apple menu > System Settings.
  2. Click Network in the sidebar.
  3. Click Firewall and switch it on if it is off.
  4. Click Options for the detailed settings. The table below says what to do if something looks wrong.

02What the Mac firewall does

A firewall is a filter between your Mac and the network. Apple's built-in one protects the Mac from unwanted contact initiated by other computers when you are connected to the internet or a network. In other words, it is about incoming connections: someone else trying to reach a service on your machine. Its setting exists to prevent unwanted connections from the internet or other networks.

Even with the firewall on, your Mac can still allow access through it for some services and apps. Ports are the usual reason. A port is a numbered door a service listens on. If you turn on a sharing service such as file sharing, macOS opens a specific port for that service. That is why turning off unused sharing services, further down, matters as much as the switch.

03What you can set in Options

Once the Mac firewall is on, you control it app by app. You can select apps and services and say whether each may accept connections through the firewall. When something tries to connect to an app you have not added and allowed, an alert asks whether to allow or deny the connection.

OptionWhat it does
Allow or block an appYou choose per app or service whether it may have access through the firewall
Automatically allow built-in software to receive incoming connectionsBuilt-in apps and services signed by a valid certificate authority are added to the allowed list without asking you
Automatically allow downloaded signed software to receive incoming connectionsDownloaded apps and services signed by a valid certificate authority are added to the allowed list without asking you
Enable stealth modeYour Mac stops responding to probing requests

A signed app is one whose developer proved who they are with a certificate from a certificate authority, a company that vouches for identities. The two automatic options only decide whether such apps are added to the list without a prompt. For how macOS judges downloaded software at first launch, see Gatekeeper on Mac.

04Stealth mode

Stealth mode makes it harder for hackers and malware to find your Mac. With it on, the Mac does not respond to "ping" requests or to connection attempts from a closed TCP or UDP network. A ping is a small "are you there?" message, and TCP and UDP are the two common ways data travels between computers.

The Mac still answers requests from apps that are allowed, but unauthorized requests such as ICMP (the protocol behind ping) get no response. To turn it on, click Options in the Firewall settings, turn on "Enable stealth mode", then click OK. If the firewall is off, turn it on first.

05If something looks wrong

What you seeWhat it means or what to do
Options is greyed outThe firewall is off, so turn it on first
Stealth mode is not offeredThe same: the firewall is off, turn it on and come back
A message about an appSomething tried to connect to an app you have not allowed, and the alert asks whether to allow or deny it. Until you take action, the message stays and every attempt to connect to that app is denied
An app you rely on stops workingBlocking an app can interfere with it or with software that depends on it. Look at the per-app list instead of switching the firewall off
An app is missing from the listSome apps that do not appear in the list may still have access, such as system apps, services and processes, and digitally signed apps that other apps open automatically. To block them, add them to the list

The last row means the list shows what you decided, not everything that can reach your Mac.

06Turn off what you do not use

A service you never use gains you nothing, so this step is cheap. The firewall is one layer. The other is to remove what listens. For additional security, you can prevent connections to incoming services by turning off the service in Sharing settings. The Sharing list is in System Settings under General > Sharing. Screen Sharing, for example, lets other users on your network access your screen. If you do not use it, turn off Screen Sharing there. The Mac hacked page walks through which entries to look at first.

07Outgoing connections are another tool

The firewall above is about incoming contact. If you want to see or stop where your apps connect out to, a different kind of tool does that. LuLu is a free, open-source firewall that blocks unknown outgoing connections. The two tools cover different directions:

ToolWhich connections it covers
Built-in firewallIncoming, started by other computers
LuLuUnknown outgoing connections from your own apps

For the best-known options, see outgoing firewalls for Mac. The same idea applies to coding agents: limiting what an AI agent can reach covers the settings in Claude Code, Cursor, Codex and Gemini CLI.

08The short version

The Mac firewall is a built-in switch under System Settings > Network > Firewall. Check it, turn it on, add stealth mode, and turn off sharing services you do not use. The rest of the switches are in Mac security settings and the Mac security checklist. Disk protection has its own page: FileVault.

FAQ

Does a Mac have a built-in firewall?

Yes. Apple's built-in firewall can protect your Mac from unwanted contact initiated by other computers when you are connected to the internet or a network.

Should I have my Mac's firewall on?

Turn it on. It is a switch under System Settings > Network > Firewall, and it lets you stop unwanted connections from the internet or other networks. If an app you rely on stops working afterward, look at the per-app list instead of switching it off.

Where is my Mac firewall?

Choose Apple menu > System Settings, click Network in the sidebar, then click Firewall.

How do I enable the firewall on my Mac?

Open System Settings, click Network in the sidebar, click Firewall, and turn it on.

What happens if your firewall is turned off?

Then it is not doing its job: guarding your Mac against unwanted contact started by other computers. Turn it on under Apple menu > System Settings > Network > Firewall.

What does the Apple Mac firewall do?

It protects the Mac from unwanted incoming connections, and you can allow or block individual apps and services. In stealth mode it also stops your Mac answering probing requests.

Does the Mac firewall stop apps from sending data out?

No. It protects against contact initiated by other computers. A separate tool covers outgoing connections, see the last section below.

Sources

  1. Apple Support, block connections to your Mac with a firewall
  2. Apple Support, change firewall settings on Mac
  3. Apple Support, use stealth mode
  4. Objective-See, LuLu
The firewall watches who connects in. Artificial Immunity's free, open-source core watches what starts on your Mac from the inside.Get the free core