Skip to main content

macOS · Network & Internet

Block unwanted incoming network connections

The built-in Firewall controls which apps and services are allowed to accept incoming network connections, adding a layer of protection against unauthorized access while connected to any network.

How to open Firewall

  1. Open System Settings → Network → Firewall
  2. Turn on Firewall
  3. Click Options to review or add per-app rules
  4. Enable Stealth Mode under Options for additional protection

What you should know

  • Per-app rules to allow or block incoming connections
  • Stealth Mode to prevent the Mac from responding to network probes
  • Automatically allows signed apps and built-in services by default when enabled
  • Firewall logging for reviewing blocked connection attempts

Why it matters

On shared or untrusted networks, such as public Wi-Fi, an active firewall reduces the attack surface by blocking unsolicited incoming connections that could otherwise probe for open services or vulnerabilities. It is a foundational, low-effort security layer that works underneath whatever apps you are running, complementing rather than replacing safe browsing habits and up-to-date software.

Best practices

  • Turn on Stealth Mode when frequently using public or untrusted networks
  • Review the app rules list periodically and remove entries for apps you have uninstalled
  • Allow incoming connections only for apps you specifically expect to receive them, such as file-sharing or remote-access tools
  • Keep the firewall enabled by default and only disable temporarily for specific troubleshooting

Common problems and fixes

A local network app like a media server cannot be discovered
Add the app to the Firewall's allowed list, or temporarily disable the firewall to confirm it is the cause before permanently allowing it.
File sharing between Macs on the same network fails
Confirm File Sharing is both enabled in Sharing settings and allowed through the Firewall's app rules.
Firewall setting reverts after a major macOS update
Re-enable Firewall and re-add custom app rules if a major upgrade reset network preferences.

Tips and tricks

  • Combine Stealth Mode with disabling unused sharing services in Sharing settings for a tighter security posture on public networks.
  • Check Firewall Options' logging output when diagnosing why a specific local app cannot connect.

Frequently asked questions

Does the Firewall block outgoing connections too?

No, macOS's built-in Firewall primarily manages incoming connections, not outgoing traffic.

Is Stealth Mode the same as being invisible on a network?

It prevents the Mac from responding to certain network probing techniques like ping, but the Mac can still be visible through other means such as file sharing announcements.

Do I still need the Firewall if I use a VPN?

Yes, a VPN encrypts and routes traffic but does not replace the local incoming-connection filtering the Firewall provides.

More Network & Internet guides for macOS

See every macOS guide